• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
3

A method to create completely customized photo book page templates from scratch in Lightroom 5

Community Beginner ,
Jul 13, 2013 Jul 13, 2013

Copy link to clipboard

Copied

I was able to successfully create completely customized Lightroom 5 page templates (including altering the number of, positions, and sizes of pictures) by making edits to the templatePages.lua file(s) in the Lightroom directory tree.  I have never heard of the LUA file format before, but it is ASCII and looks somewhat like XML, so it was fairly easy to decipher.  Here is a high-level description of how I did it.  This applies to Lightroom 5 on Windows 7.  If this doesn't make any sense to you, then don't try it - you're likely in over your head.  Although my description is brief and lacking in detail, it should enable someone who is capable of handling this to figure it out with a little of careful trial and error.  Do this at your own risk - if you screw-up your installation, catalog, or computer, it's your own fault.  It all worked great for me.

First, open the "<lightroom 5 install directory>\Templates\Layout Templates" folder.  Then navigate to the template set that contains the template you would like to use as a starting point for the new template.  For example, "12x12-blurb\clean12x12".  Make a back-up copy of the templatePages.lua file in case you mess something up and want to revert.

There will be a bunch of .jpg files in this directory that each contain a preview image of the layout that carries the same name as the .jpg file.  Find the one that you would like to use as a starting point.  Take note of the name of the file, which is probably something similar to "page_26_preview.jpg".   Duplicate the file and rename it to something unique, such as "dummy_preview.jpg".  It's just temporary, so it doesn't matter what name you pick, provided it is a legal file name with no spaces.

Next, open the templatePages.lua file in a text editor.  I suggest using one that can automatically recognize and format ULA (such as Notepad++, which is open source and free to use).  Then search the file for the unique portion of the file name you took note of earlier, such as "page_26".  It will point you to a section in the LUA file that describes that particular template.  Carefully copy that entire section, including a balanced number of brackets (starting with the two brackets and commas before "children" and ending with the one bracket and comma after the "title" line.  Paste the copied text into the end of the file on a new line immediately following the bracket and comma after the "title" field for the last page template section (right near the end of the file).  Change the "previewName" field to the name of the preview file copy that you created ("dummy_preview.jpg" for me) and the "name" field to the name of the new template you're creating ("dummy" for me, since it is just temporary).  Next change at least one of the hex characters in the "pageID" field such that the new template will have a unique page identifier.

Now you can make edits to the photo and text fields included in the new section, using other templates in the template file as examples.  "x" and "y" fields are coordinates (in pixels) for the bottom-left corner of the picture or text field, "height" and "width" are the width of the field in pixels.  The fields should be mostly self-explanatory, but make sure that the "photoindex" fields are filled-in starting from 1 to N, where N is the number of pictures in the template, with no duplicates or gaps.  They do not need to be in order.  Treat the "textIndex" fields similarly for text fields.  If you want to add an additional picture or text field, simply copy the section describing a picture or text field from another template and paste it, carefully, into the new template that you are creating.

Once you are done, save the file (you may get interference from Windows UAC, in which case save the file elsewhere and the move it back to the correct directory).  Then open Lightroom.  Create a new photobook, and choose the new template for one of the pages, remembering that the preview image will look like the JPG that you copied.  Voila!  If you didn't screw anything up, you should see a page based on your new template.  Then right-click the page and select "Save as custom page", which will cause a fresh preview file to be created for your new template and your template to be copied to the "custom pages" section of the template menu.  The new section you added to the "templatePages.lua" and the "dummy" preview file can now be deleted, since they are no longer needed.  I save them so that I may simply overwrite them the next time I need to create a customized template.

Enjoy, and please share any clarifications, corrections, or enhancements to my process.

Views

55.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 11, 2017 Jan 11, 2017

Copy link to clipboard

Copied

Yes, it was a simple fix 🙂

For some reason, when I was testing, I got a different MIME type than you. I was able to replicate the error on my laptop. So now two types are supported.

Please try again. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

Works perfectly!... thanks a lot indeed!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 03, 2019 Oct 03, 2019

Copy link to clipboard

Copied

Hi! This seems great. Can you tell me if with this tool it is possible to customize page sizes? Also... do you have a mac development for this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2019 Oct 03, 2019

Copy link to clipboard

Copied

LATEST

To masattlo,

An earlier post stated- "why don't Adobe allow free form image and text placement on the page"

That was in 2016!  Things have changed a lot since then.

The Book module now (Lr-Classic v8.4.1) does allow 'Cell' size and placement position as "free form". (But not 'Rotation').

You asked- "possible to customize page sizes?"

(unfortunately) Book 'Page Size' is still limited to the Blurb Photo Book sizes.

https://www.youtube.com/watch?v=eGSTAgB2ukg

http://blogs.adobe.com/jkost/2018/08/lightroom-classic-updates-book-module-import-presets-profiles-h...

ScreenShot380.jpg

 

 

Regards. My System: Lightroom-Classic 13.2 Photoshop 25.5, ACR 16.2, Lightroom 7.2, Lr-iOS 9.0.1, Bridge 14.0.2, Windows-11.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines