Advice sought: merge documents including images

Everything related to our flagship word processor.
Post Reply
alanterra
Posts: 20
Joined: 2013-10-08 13:58:39

Advice sought: merge documents including images

Post by alanterra »

Hi

I have a catalog of images (in Lightroom Classic) and I want to a create pdf for each, consisting of the image, along with metadata for that image. I can easily get Lightroom to output a csv file of file names and data like this:

Image, Title, Creator
"/Users/me/Desktop/images/image1.jpg", "My big day", "me"
"/Users/me/Desktop/images/image2.jpg", "His little day", "my friend"

I want to design a form, do a merge, and then export as a pdf. Eventually I'll have a few hundred of these documents, so it would be nice to automate it all the way to the "print as pdf" stage, but if I can just create rtf files for each, and then print to pdf by hand, that won't be too bad.

I have figured out that I can use the macro language to insert images, but is it possible to use the merge feature to accomplish what I want? What is the easiest, and most maintainable, way forward?

Thanks
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Advice sought: merge documents including images

Post by martin »

Although Nisus Writer Pro does include a Document Merge feature that handles CSV files, it can't handle your particular situation because of the customized images.

You could have a merge template document with a single non-variable image, but you won't be able to customize the image based on each CSV record.

We do let you insert merge placeholders that run custom Perl code during the merge process. Those Perl placeholders can output dynamic information based on the data in your records. However, you won't be able to get Perl to generate an image for you. It can only generate plain-text content.

I'll file a feature request that we should enhance our document merge placeholders to allow executing arbitrary Nisus macro code (not just Perl code). That would give you access to customizing the merger output in the way you need.

For now I think your only solution is to write a custom Nisus Writer macro. You'll have to parse the CSV and generate images using customized code. Please let us know if you have any macro questions.
Post Reply