Topic Options
#24726 - 04/01/10 09:33 AM print multiple pdf's with variable number of pages
RustyDust Offline
OL Newbie

Registered: 06/03/09
Posts: 3
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!

Top
#24727 - 04/01/10 10:41 AM Re: print multiple pdf's with variable number of pages
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
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

Top
#24728 - 04/01/10 12:22 PM Re: print multiple pdf's with variable number of pages
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 197
Loc: Objectif Lune NL
This issue was fixed in PSM 7.

Top
#24729 - 04/06/10 02:35 AM Re: print multiple pdf's with variable number of pages
RustyDust Offline
OL Newbie

Registered: 06/03/09
Posts: 3
after a long weekend:

Hello Rapha

Top