print multiple pdf's with variable number of pages

Posted by: RustyDust

print multiple pdf's with variable number of pages - 04/01/10 09:33 AM

Hello,

I have a database with a field which holds the name of a pdf-file. In total i have more than 200 different pdf-files in a directory, with a various number of pages (1 to max. 6 pages). I insert the pdf as an image and call the right pdf via the value in the field (which isn't possible when inserting them as a pdf-file) and distribute the pages over 6 layouts.

Then i use for each layout the expression:
layout1: "IF (OBJECT_EMPTY("Image 1")=True, Skip, Print)"
layout1: "IF (OBJECT_EMPTY("Image 2")=True, Skip, Print)"
etc...

Unfortunately, it seems this expression doesn't work for pdf-files inserted as an image . It works when inserted as a pdf , but then i can't use the field in which the filename of the pdf is stated.

A mix of both possibilities would be great... Is there anyone who has a solutuion to help me out of this? Thx in advance!
Posted by: Raphael Lalonde Lefebvre

Re: print multiple pdf's with variable number of pages - 04/01/10 10:41 AM

RustyDust,

When using an image instead of a pdf, it looks for an image's file name. As long as the object has a path to a file in it's expression, it won't be considered empty, so OBJECT_EMPTY won't work in that case.

There is a command called TOTALPAGES that returns the total number of pages in a pdf. So in each of your layout conditions, you could have:

Layout 1: IF (TOTALPAGES(file) >= 1, Print, Skip)
Layout 2: IF (TOTALPAGES(file) >= 2, Print, Skip)
Layout 3: IF (TOTALPAGES(file) >= 3, Print, Skip)

And so on. "file" will be replaced by the name of the file contained in your field.

Hope that helps!

Regards,
Rapha
Posted by: Sander vd Berg

Re: print multiple pdf's with variable number of pages - 04/01/10 12:22 PM

This issue was fixed in PSM 7.
Posted by: RustyDust

Re: print multiple pdf's with variable number of pages - 04/06/10 02:35 AM

after a long weekend:

Hello Rapha