Jump to content

Need to add a blank page within provided pdfs


Skidoo42

Recommended Posts

I have a series of 31,000 pdfs each day. The pdfs are all image, image, image.

I need to add a blank page to the back of the first image, so that the output pdf is image, blank, image, image. Thus changing a 3 page pdf into a 4 page.

 

The first page of the provided image is a letter, the 2nd and 3rd page are invoice format sheets. The client wants the first page to be simplex, and the 2nd and 3rd provided images to be duplexed on the same sheet. They know that we will need to charge them for duplex of both sheets.

 

my template is setup as an overflow from the first page to the 2nd page, but when I add a blank page in between them, FP puts that blank page in the 4th page position on my output.

 

Here is my template and the code:

 

 var pathName = "C:\\Users\\tfischer\\Desktop\\Troy and Dan\\e470 test\\";
var FullResourcePath = pathName + Field("PDF File Name"); //change to match your data file field
var x = new FusionProResource(FullResourcePath, "graphic", 1);
if (!x.exists)
ReportError("Graphic not found: " + FullResourcePath);
var pdfString = '';
for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++)
{ 
x.pagenumber = pgnbr;
pdfString += x.value + '<p>\n';
}
Print("Result is: " + pdfString);
return pdfString;

yellow presort 2.pdf

Link to comment
Share on other sites

This is hard to test without input file and resources but you may be able to achieve the result you want by doing the following:

 

  1. Go to menu FusionPro / Data Definition / Input Options / Edit Fields then change PDF File Name to Type Graphic
  2. Add a blank page in your template before page 1
  3. Create a graphic frame covering that page
  4. Set the Field or Rule in the Graphic Frame palette to be PDF File Name
  5. Move what used to be body page 1 to body page 3
  6. You probably need to move the small text frame in the upper right to page 1
  7. Open the Rule AlexMarshall and change var pgnbr = 1 to var pgnbr = 2

 

What should happen is now page 1 will be static on page 1. Page 2 will be your blank. Page 3 and any following pages will be the overflow starting with page 2 of the input PDF.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...