Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library


Thread Tools Search this Thread Display Modes
Old November 29th, 2016, 03:44 PM
eliggins eliggins is offline
Forum n00b
Join Date: Jul 2015
Posts: 5
Default 1 pdf, many pages

Hi, I'm needing to building a versioned product that will need to detect how many pages of a pdf are being uploaded to it. The idea is, in the portal I would have a field that the client would input the number of pages, for instance 1-8, they would then upload one pdf that would be 1 page or 8 pages, and the template would create the additional pages as needed. My question is, is this possible, and how? I can't use job direct as it doesn't allow impositons
Reply With Quote
Old November 30th, 2016, 09:54 AM
step's Avatar
step step is offline
Senior Contributor
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: 1 pdf, many pages

You can determine how many pages are in a PDF by using the 'countPages' method of a FusionProResource. For example:
var pdf = CreateResource(Field("Uploaded PDF Location"));
return pdf.countPages;
Aside from that, though, I'm not sure how to answer the rest of your question. How are you going to "build additional pages as needed?" Are you just trying to output the first page of the uploaded PDF X times? In other words: if they upload a 2 page PDF and input "8" pages, you'd duplicate the first page 6 more times so that you'd end up with an 8 page PDF? If that's the case, it doesn't really matter how many pages are in the PDF they upload, you could just set the record to repeat as many times as the client input – each time returning the first page of their uploaded PDF:

FusionPro.Composition.repeatRecordNumber = Field("Number of pages");
FindGraphicFrame("Your graphic frame").content(CreateResource(Field("Uploaded PDF Location"), 'graphic'));
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 04:25 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.