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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old November 6th, 2014, 10:49 AM
Fellsway Fellsway is offline
Junior Community Member
 
Join Date: Apr 2012
Location: Dallas
Posts: 35
Default Re: Inserting Multi-page PDF variable graphics

That worked great! Thanks Dan!!
Reply With Quote
  #42  
Old January 19th, 2015, 08:06 PM
farns farns is offline
Junior Community Member
 
Join Date: Apr 2010
Posts: 38
Default Re: Inserting Multi-page PDF variable graphics

Dan, I'm revisiting this thread for some new insight. I used this solution about a year ago to tackle a project and it worked great. Now I'm trying something new.

I have a client who is doing their own VDP composition and sending me PDF files which are very great in number. Some have 300,000 pages in them!

We are working with them presently using a band-aid solution with our pre-press software, Preps. I use Acrobat Pro to break the 300,000 record file into 3600 record chucks, as we run this job 6-up, and want 600 sheets in a stack.

I'm toying around with automating this with FP (and ultimately letting FP Server do all the heavy lifting).

I don't care if I have to break the files into chunks still, that's super easy. But if I was able to feed the original file in, that would be even more awesome.

But the problem I'm running into, as others have mentioned, is the 6-up imposition doesn't work, because even though there are 3600 "records" in the pdf file, FP sees the file as "1 record". I've been re-reading this trying to understand if there's another approach... Is there a way for me help FP see that every two pages in the PDF constitutes a new "record" or "instance"? I'm not sure I'm asking for exactly the same thing as other users here, but I'm not sure I'm following all the responses.
__________________
FusionPro API Producer 9.3.9 (Windows)
FusionPro Expression 3.2 (Windows)
MarcomCentral Beginner :-)
Reply With Quote
  #43  
Old September 30th, 2016, 12:52 PM
merski007 merski007 is offline
Junior Community Member
 
Join Date: Jan 2014
Location: Milwaukee, WI
Posts: 26
Default Re: Inserting Multi-page PDF variable graphics

Hey everyone!

This is an awesome thread and has really helped me with my project. Below is the tactic I ended up using:

-Create a 48pg document to receive in any pdf with up to 48pages
-Name each page as 'p1', 'p2, 'p3', etc...
-Make them all unused pages except for pg1
-Create a graphic frame on each page and name the frames 'p1', 'p2, 'p3', etc...
-The OnRecordStart will do the rest

Take a look at the zip attachment, all code and a working template are included inside it.

Here is the code for those who want a quick preview:
pagesInPDF = 0;
markupToReturn = '';
PDFresourceRef = new FusionProResource(Field("image"), "graphic", true);

//Find out how many pages it has
pagesInPDF = PDFresourceRef.countPages;

//Page usage loop to turn pages on based on pagesInPDF
for (i = 1; i <= pagesInPDF; i++){
FusionPro.Composition.SetBodyPageUsage('p' + i, true);
}

//Graphic frame loop to specify which pdf page goes into which graphic frame
for (pageLoop = 1; pageLoop <= pagesInPDF; pageLoop++){
var frame = FindGraphicFrame('p' + pageLoop);
frame.SetGraphic('<graphic file="' + PDFresourceRef.name + '" pagenumber = "' + pageLoop + '" scale="off" />');
}

return markupToReturn;

*****One catch with this template, you can't impose multiple records where the pdf page count varies. For example, record 1 has a 16p PDF and record 2 has a 32p PDF. The template will only use the record 1 (16p) info. I believe this due in part to the template using FPImposer.

Cheers,
Mark
Attached Files
File Type: zip FP_Forum.zip (88.6 KB, 12 views)
Reply With Quote
Reply

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 10:05 PM.


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