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
#51978 - 07/06/15 05:43 PM Create multiple pages using one page
AIWhite Offline
OL Newbie

Registered: 07/06/15
Posts: 3
I need to create a 100 page final document that cycles through 8 different media colors, based off of a single PlanetPress page. Is this possible? I've looked through the forum and manual and can't figure it out. This might not be right code-wise, but this is the general idea of what I'm trying to accomplish:

define( &paper_type,arraystring,['Paper1', 'Paper2', 'Paper3', 'Paper4', 'Paper5', 'Paper6', 'Paper7', 'Paper8']
&count := 1
&i := 0
repeat
&count := &count + 1
for(&i,0,1,7)
get(&paper_type,i)
endfor()
until(&count = 100)

Top
#51988 - 07/07/15 09:37 AM Re: Create multiple pages using one page [Re: AIWhite]
Raphael Lalonde Lefebvre Offline
OL Expert

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

So if I understand, for each data pages, you want to print 8 copies on 8 different media?

To do this, you'll need the "selectmedia" command. You'll find it's syntax here: http://help.objectiflune.com/en/planetpress-design-user-guide/7.6/Default_CSH.html#/3025.html

One particularity is that the "selectmedia" command doesn't support variables as it's parameters, so you'll need to make several conditions to check the value of the array, and manually enter the correct paper type in the parameters of selectmedia. It could look like this:

if(get(&paper_type,i) = 'Paper1')
selectmedia(8.5, 11, 'Paper1', 'White', 75, 0, 0)
endif()
if(get(&paper_type,i) = 'Paper2')
selectmedia(8.5, 11, 'Paper2', 'White', 75, 0, 0)
endif()

...

After you've done all your conditions, you need to add the "showpage()" command to actually generate the page. In this case, you'll want to add it right after the "endfor".

Do note, however, that for selectmedia to work, your printer actually has to support postscript-based media selections, and your media names needs to be properly defined on the printer. Not all printers supports these features, or they might not support the method we use to do it. If it doesn't work, an alternative method would be to use "callppd" instead of selectmedia, and use ppd commands to do the media selection. This will require you to find a ppd file that's made specifically for your printer, and that contains it's own option for media selections. This may or may not exist, however, so you'll need to visit your printer manufacturer's web site, and see what ppd files you can find.

Neither of these methods will work in the context of "Print Using a Windows Driver". In Workflow, you must use a "Printer Queue Output", not "Print Using a Windows Driver", or it will not work.

Regards,
Raphaël Lalonde Lefebvre

Top
#51989 - 07/07/15 10:01 AM Re: Create multiple pages using one page [Re: AIWhite]
AIWhite Offline
OL Newbie

Registered: 07/06/15
Posts: 3
Thank you, that's very helpful. Our printer does support that method. Although, it's not for each data page, as the only data will be images, but for each Normal page on the PlanetPress document. Does that change anything?
Thanks!


Edited by AIWhite (07/07/15 10:02 AM)

Top