• 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.3K

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 Beginner ,
Oct 06, 2014 Oct 06, 2014

Copy link to clipboard

Copied

In case anybody finds it useful, I started developing a program to simplify the creation of book templates - mostly automating these instructions.  It's not pretty, but it is at least to a point that it is working for me on the Mac platform.  Development was done using node-webkit, so it should work on Windows as well, but it will need updated with some settings for directories, and some testing.

Hopefully posting a link here is acceptable.  I have nothing to gain from this - just sharing for the community.

slynn1324 / lightroom-book-template-editor — Bitbucket

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
Explorer ,
Oct 23, 2014 Oct 23, 2014

Copy link to clipboard

Copied

Hi  can i test this o windows ? Need instructions on how to run it ?

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 ,
Feb 27, 2015 Feb 27, 2015

Copy link to clipboard

Copied

Hi, I'm really interested in your program, but when I run it I get to the first screen with the list of book sizes, and when I click the book sizes I get "Book: {{book_size_name}} Change " and that's all. For every book size.

I actually can't find any .lua files on my computer at all even though I've saved lots of custom pages, but that may be an unrelated issue. I've got your test file's there, do they need to be in a specific directory?

I've got some programming background, so can usually figure out this type of thing, but I am fairly new to macs. Running OS X Yosemite and LR 5.

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 ,
May 14, 2015 May 14, 2015

Copy link to clipboard

Copied

jolenem,

A bit late to the party, but I just downloaded slynn1324's program and had the same issue. After digging through his files, I determined that within the lrbe.app package (right click and show package contents in finder) open and edit the file /lrbe.app/Contents/Resources/app.nw/app.js then change line 32:

var BASE_PATH = "/Users/slynn1324/Library/Application Support/Adobe/Lightroom/Layout Templates/";

Make sure this points to your own Layout Templates/ folder (you'll likely just have to replace /Users/slynn1324/ with your own Users folder).

Hope that helps you like it did me!

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 ,
Jun 22, 2015 Jun 22, 2015

Copy link to clipboard

Copied

Thank you so much! I only just found this reply to my problem and it has sorted it perfectly! With that fix, the program seems to be working perfectly for me!

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 Beginner ,
Feb 01, 2016 Feb 01, 2016

Copy link to clipboard

Copied

Hi,

I am on windows and I changed line 32 to

var BASE_PATH = "C:\Program Files\Adobe\Adobe Lightroom\Templates\Layout Templates";

I assume I run home.html  ...is that right ?

when I do I get

Choose the book size to edit: 

{{size.name}}

any suggestions would be appreciated

Note I also tried index.html but nothing was displayed in browser.

Tim

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 ,
Aug 13, 2017 Aug 13, 2017

Copy link to clipboard

Copied

This got it working for me, but the save button doesn't seem to do any thing. Can you offer any suggestions for that? 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
Explorer ,
Apr 14, 2015 Apr 14, 2015

Copy link to clipboard

Copied

I really would like to set custom sizes for the entire book.
So how can I change the size of the books.


I want to create a book with the size of 12,5cm*19cm and print it as a book.

Possible?


Thanks a lot!

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
Explorer ,
May 01, 2015 May 01, 2015

Copy link to clipboard

Copied

I have been able to change a template within a given book size but i am loking for instruction to change the book size.

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
Explorer ,
May 28, 2015 May 28, 2015

Copy link to clipboard

Copied

Dear Lightroom 5 Window users,

I managed to translate my photoshop templates to lightroom and I have started to create small collections of book templates for Lightroom 5 Windows users ( I do not know if they run in OS).
if you wan you can find my tamples in low cost in my ETSY shop Lightroom 5 Book Templates double sheet by PhotoRetouchStaff . All templates have their own bw Masks in order to further edit in photoshop if needed to

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 ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

Thanks for this but even the opening few sentences have put me off pursuing this any further.


What's LUA, ASCII and XML?   There's nothing 'easy to decipher' about this!!!!


"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."

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 Beginner ,
May 20, 2016 May 20, 2016

Copy link to clipboard

Copied

LUA is the file extension, just like .txt and .doc. The adobe .lua file is simply a text file that lightroom uses. It contains the sizes of the photo cells (see the post by Sep 13, 2014 2:43 PM above). ASCII refers to simple text. All that means is we need not be intimidated by the weird ".lua" file type since it opens easily in notepad or any simple text editor (or MS Word).

When you open the file you see it has curly brackets meaning it has a specific format. If you delete a curly bracket Lightroom will not be able to read the file at all. There are many other languages that are like this. XML is just one of them. HTML is another.

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 ,
May 21, 2016 May 21, 2016

Copy link to clipboard

Copied

Esther

I appreciate you input but this is getting way too complicated for me!

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 Beginner ,
May 20, 2016 May 20, 2016

Copy link to clipboard

Copied

I happened to be at a conference with Julianne Kost in May 2015 and asked her this question. Her only response was that I should use InDesign.

I have been editing the .lua files to create my own set of templates for a number of years. I prefer template sets with fixed outer margins (same on each page) and equal spacing between cells and it disappoints me that none of the built-in template sets have that uniformity of design.

I also print A4 but since there is no A4 option for template size I simply use the 12x12 size (or 10x13), export the jpgs and crop to fit A4 using a batch action in Photoshop.

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
Explorer ,
Aug 13, 2016 Aug 13, 2016

Copy link to clipboard

Copied

Hi guys - I have just started to adjust the book sizes and create my own templates. So far this looks quite "simple" just time consuming to create the .lua files and reference .jpegs.

But I have to questions.

How do I create a box containing text instead an images box?

Image boxes are defined as PDEImages, what is the ID for a text-box?

And do you have any idea if it would be possible to adjust the book names in the Lightroom dropdown?

I found a couple of .lua files which defines something link book names and sizes in inch and metric. But trying to adjust e.g. the metric size stopped to book module to work..

e.g. layout-template-size.lua

thanks for your help.

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 Beginner ,
Aug 13, 2016 Aug 13, 2016

Copy link to clipboard

Copied

I have been creating textboxes in a few ways.

1. I use a photo placeholder that I defined in my .lua file and in LR I add photo text to it. That text can be above, over or under the photo placeholder. I choose over.

2. I add page text in LR. Page text is completely customisable as I can adjust the cell margins and place the block of text anywhere on the page.

3. If I do option 2 and then save as a custom page, it seems that the .lua stores that as a permanent text placeholder and next time I choose that template I have the page text I created in option 2 as well as the option to create new page text. (I think it is a bit buggy!)

But then you will then see the syntax and can create your own text placeholders in the .lua file.

Does that help?

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 Beginner ,
Aug 13, 2016 Aug 13, 2016

Copy link to clipboard

Copied

Both photo and text placeholders appear to be have "type = "PDEImage". The difference is the placeholderType.

It is placeholderType = "text"

And I've had no success changing book names or dimensions!
There are a few parameters in the .lua file that I have tried tweaking to no effect and remain mystified by!

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
Explorer ,
Aug 14, 2016 Aug 14, 2016

Copy link to clipboard

Copied

Hi esther - thanks for this! I was looking for the "placeholderType" name. So its pretty easy, if this is just "text".

I will try to create some templates e.g. 1 portrait image on a left have of the page and the similar sized text box on the right half. I guess with the placeholderType this should be easy to do.

Next week I will ask a colleague to decompile all .lua files from the resource folder of the book modul. Lets see if I find out how to rename the books and or the dimensions. Would be nice to offer the proper dimensions within the dropdown, where a user chooses the book size, as I have custom book sizes and plan to create 4 custom book sizes.

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
Explorer ,
Oct 30, 2017 Oct 30, 2017

Copy link to clipboard

Copied

Were you able to change the book sizes?

I have been able to use templates with custom page sizes within the standard book sizes that come with Lightroom. For example, I have custom templates withing the large landscape size that are 11x14, even though the large landscape size is 11x13. This works. However, depending on the window size, sometimes the book module does not show the full book pages. I also find that sometimes Lightroom becomes very slow when using the book module with my custom page sizes. I wonder if this is because of incompatibility between the book size assume within the book module and the book/page sizes in my custom templates.

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
Contributor ,
Oct 30, 2016 Oct 30, 2016

Copy link to clipboard

Copied

I am sorry, but I find this process extremely complicated to do it alone without messing up anything...

I've started to read it, but due I did not seen any ordered list with clear steps and a bunch of text (with all my respects for the author)... I finally declined.

We need this article updated for Lightroom 6

And we need a clear step by step process...

1. do this

2. do that

3. now this

4. and you are done, great job

As far as I know, the solution is to create a new blurb template... (perhaps I am wrong)

However, what I want is to create just a new template, custom size, not a blurb template.

FOR THIS, WE NEED A SIMPLE UTILITY.

Due the process is copying, opening a file, edit it... save it... make a backup from old files and so on... a simple utility of someone willing to help, could automate the process without having to make such quantity of "bricolage".

The research done is great, because is a giant step to make possible to create custom templates... but having to do this myself is too much for me.

If someone here knows how to program and could do a free utility for this, would be amazing.

Cheers

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 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

Using Lightroom only, best current advice at- Quick Tip – Customizing Page Templates in Lightroom « Julieanne Kost's Blog

Read the Comments-

I have used the print module to create page “templates” that I then print to JPEG and import into the book module as a work-around.

Create as many page ('print') templates as you want to suit the size of your book pages. Insert the created jpgs into the book as a single image on a  'full page' book template.

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
Contributor ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

Sadly, you cannot change the page dimensions.

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
Explorer ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

Am I the only one who thinks this is all utterly absurd?  For goodness sake, why don't Adobe allow free form image and text placement on the page rather than confining users to templates that simply don't cover every single user requirement.  I mean this is just dumb and we are all tip toeing around the obvious demand for freedom.

Apple's Aperture allows free form page layout without the need for templates.  The sad thing is that Apple have discontinued support for Aperture.  It defies logic that Adobe goes down the path of implementing some kind of bizarre template structure to make the process so complicated.  The whole book community it crying out for simple book page layout creation.  By all means have templates for those who want a structure but also allow the freedom of image and text placement for those who require it.

The Book module could be so much better.  Lightroom is a great product for a photographer but creating books is hard work if you want to create eye catching layouts that are fun and engaging. Creating "Print" templates and then populating them with images then outputting them as a JPG and then importing that into your collection and then placing them on a blank page is just plain time wasting.  Give. me. a. break.

Does Adobe actually care about what users want?

End of Rant.

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 ,
Jan 08, 2017 Jan 08, 2017

Copy link to clipboard

Copied

Thank you very much for your post, MVulovic. It put me on a track to develop my own tool to create Lightroom templates. I've made an early version of the PagePlus to Lightroom convertor available here. It allows you to create a layout in Serif PagePlus (a free/budget desktop publishing application for Windows) and convert it into a file that Lightroom can read.

I hope it proves to be useful. Feedback is welcome!

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 10, 2017 Jan 10, 2017

Copy link to clipboard

Copied

DrLogiX - wow that is exactly what we need!... Just what I have been trying to find for ages! - something that will convert layouts to the right coding that LR can read. 

However! - Im having a bit of trouble getting your webform/convert to work! - when selecting a .PPP file (even the sample one you provided) it comes up with a error:

Error: Uploaded file should be a Serif PagePlus (.ppp) file, but is application/ppp

Would be glad of your thoughts?... hopefully its a simple fix!?!?

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