IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#44554 - 08/02/13 07:15 PM Printing of Layout (only if PDF is available)
TomK Offline
OL Newbie

Registered: 01/25/10
Posts: 17
I have a Print Shop mail project with two layouts (this is a back-to-back form). There are times when we aren't printing the back (and so I would not load that PDF in the project). What I'd like to happen is when the back (back.pdf) is missing from the second layout (because I haven't loaded it into the project) that PSM simply skips attempting to print that layout. I mucked around with "File Exists Function," but don't quite understand how to create the logic (or whether there is a simpler way). Thanks for any help!

Top
#44556 - 08/05/13 09:13 AM Re: Printing of Layout (only if PDF is available) [Re: TomK]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
TomK,

You'll probably want to use a layout condition. In your layout's properties, you'll find "Expression" under "Action", where you'll be able to open up the expression editor. You can then use something like this:

Code:
IF(FILE_EXISTS("C:\myfile.pdf"), Print, Skip)



If the pdf exists, then it will Print the layout, otherwise, it will skip it. Feel free to use a variable data field for the file name if you want to. (just don't forget to add the folder path if it's not already in the field)

Hope that helps!

Regards,
Raphaël Lalonde Lefebvre

Top
#44602 - 08/08/13 12:53 PM Re: Printing of Layout (only if PDF is available) [Re: TomK]
TomK Offline
OL Newbie

Registered: 01/25/10
Posts: 17
Thank you Ralphael! This worked like a charm. (I made sure in our case to remove the "C:\" part of the pathing as I always want the project to only look locally in the project directory the operator is printing from). Tom

Top