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
#57265 - 10/29/19 02:26 PM Printing variables on a multi page PDF
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
Hi, I'm inserting a pre-printed multi page PDF image, but I don't know how to print a global variable to pages 2 to 5 of this image.

I'm using bellow method via PresTalk After.

@IncludePDF('English_ABC', true, 2, 5, false)
showpage()

Your help is appreciated.
_________________________
Peace

Top
#57266 - 10/30/19 03:31 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Jim Dornbos Offline
OL Expert

Registered: 07/23/08
Posts: 152
Loc: Flint, Michigan
I suspect that including a PDF in the way you are requires that what you want to print is already on the PDF. If you want something variable on the PDF, then you need to create a page, display the PDF on the page and display the global variable you want on the page as well.


Edited by Jean-Cédric (10/30/19 03:36 PM)

Top
#57283 - 11/05/19 04:09 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
I quite didn't understood you, do you mean for each page of the PDF file do I have to create a new page?

my pdf has 5 pages, on page first I'm adding address details but on the following 4 pages I need to print Page numbers!
_________________________
Peace

Top
#57284 - 11/05/19 04:51 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
Can you display the code of your @IncludePDF() Presstalk function?
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57285 - 11/07/19 03:44 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
below is my IncludePDF code

function @IncludePDF(&filename:string, &condition:boolean, &from:integer, &to:integer, &after:boolean)
if(&condition)
if(&to = 0)
&to := pdfpagecount(&filename)
endif()
define(&i,integer,0)
for(&i,&from,1,&to)
if(&after)
showPDF(&filename, &i, 8.5, 11.0)
showpage()
else()
showpage()
showPDF(&filename, &i, 8.5, 11.0)
endif()
endfor()
endif()
endfunction()
_________________________
Peace

Top
#57286 - 11/07/19 03:52 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
Have you tried adding the content of the global variable from within your function?

With a moveto() and a show(&globalVar), before the showpage(), that should do it.

Remember to add the global var AFTER the showPDF().
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57287 - 11/07/19 03:58 PM Re: Printing variables on a multi page PDF [Re: Sami786]
Sami786 Offline
OL Expert

Registered: 01/29/14
Posts: 400
Loc: Home
Thank you so much
_________________________
Peace

Top