PDA

View Full Version : SetBodyPageUsage


esmith
January 20th, 2010, 03:16 PM
Is there any way to refer to the page NUMBER rather than the page NAME in JS to avoid adding custom naming to large PDFs?

I have a 200+ page file that I want to print specific pages of for each record. I tried using the code:
for (i=1;i<Field("START");i++) {
FusionPro.Composition.SetBodyPageUsage(i,false);
}
for (i=Field("END")+1;i<=243;i++) {
FusionPro.Composition.SetBodyPageUsage(i,false);
}
but got the error 'Page "1" does not exist'. Records may print pages 1-18, 212-240, or 113-186 in no particular order. I would prefer not to have to manually name each page. Do I have any other options??

Dan Korn
January 21st, 2010, 08:40 AM
Instead of trying to reference pages from a 200+ page PDF template document, I would rework the job so that you're grabbing the page(s) you need from an external PDF resource as inline graphics, using Overflow pages as necessary. Check out this post (http://forums.printable.com/showpost.php?p=1002&postcount=2), or this post (http://forums.printable.com/showpost.php?p=1304&postcount=2), or this post (http://forums.printable.com/showpost.php?p=667&postcount=2).

esmith
January 21st, 2010, 10:25 AM
Thanks sir. I actually tried something along these lines after my post last night, but I was trying to set up template pages and overflow pages with <story> and <copyhole> tags, and I can't figure out how to use the markup with a separate data source and merge both with a template. Look for that as a separate post in the near future. ;)