Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 14th, 2020, 12:19 PM
StacyZ StacyZ is offline
Junior Community Member
 
Join Date: Feb 2016
Location: San Diego, CA
Posts: 18
Default Getting a Multi-Page PDF Resource to Work

Hello,

I'm trying to set up a new German envelope and running into difficulty getting the multi-page resource to work correctly.

Background info: Deutsche Post (German Post) is requiring that we use the Premium Address barcode on all of the envelopes we send with our direct mail. We have to use their software to produce that barcode, which is unique for every customer. Once we load our data into the DP software and run the file, it produces all of the addresses from our data with their corresponding barcodes on a single PDF file with each record on one page.

I downloaded the sample file from this thread on inserting a Multi-page pdf as variable graphic: http://forums.pti.com/showthread.php?t=37

I then made some adjustments to match with my data and got the following rule, which isn't working:
FieldName = 'IMP6';
PDFfileName = 'DialogLabels.pdf';
pagesInPDF = 66726;
markupToReturn = Resource('DialogLabels.pdf');
pathToAllPDFs = 'C:\Users\Stacy.Zech\Desktop\PUSH\=Projects\PremAd d_Labels\TestEnvelope(DE-F001)\Links';
pathToPDF = 'C:\Users\Stacy.Zech\Desktop\PUSH\=Projects\PremAd d_Labels\TestEnvelope(DE-F001)\Links';
PDFresourceRef = 'DialogLabels.pdf';
Print(pathToAllPDFs);
FieldsToInspect = 61;
for (fieldCounter = 1; fieldCounter <= FieldsToInspect; fieldCounter++)
{
FieldName = 'SEQNO';
PDFfileName = Field('IMP6');
pathToPDF = pathToAllPDFs + PDFfileName;
PDFresourceRef = CreateResource(pathToPDF ,'DialogLabels.pdf' ,'no');
pagesInPDF = PDFresourceRef.countPages;
for (pageLoop = 1; pageLoop <= pagesInPDF; pageLoop++)
{
markupToReturn += '<graphic file="' + PDFresourceRef.name + '" pagenumber = "' + pageLoop + '" position="afterline"/>';
markupToReturn += '<P>';
}
}
return markupToReturn;
What I am getting when I compose is the first page from the resource PDF showing on the 2nd page, which should be an overflow page.

Any help on this would be greatly appreciated.

Thank you
Reply With Quote
  #2  
Old February 14th, 2020, 12:25 PM
Alex Marshall's Avatar
Alex Marshall Alex Marshall is offline
FusionPro VDP Support
 
Join Date: Sep 2008
Location: Chicago,Illinois
Posts: 384
Default Re: Getting a Multi-Page PDF Resource to Work

Try adjusting the dimensions of the text frame by .2
Reply With Quote
  #3  
Old February 14th, 2020, 12:56 PM
StacyZ StacyZ is offline
Junior Community Member
 
Join Date: Feb 2016
Location: San Diego, CA
Posts: 18
Default Re: Getting a Multi-Page PDF Resource to Work

Hi Alex,

I tried that but it didn't work. The output is the same with only the first address showing on what should be the overflow page, not the envelope front (page 1).

Thank you
Reply With Quote
  #4  
Old February 17th, 2020, 07:35 AM
StacyZ StacyZ is offline
Junior Community Member
 
Join Date: Feb 2016
Location: San Diego, CA
Posts: 18
Default Re: Getting a Multi-Page PDF Resource to Work

I was able to get the PDF to show in the correct place and on the correct page but it won't show anything other than the first page of the resource pdf for every record in the output file.
Reply With Quote
  #5  
Old February 18th, 2020, 01:46 PM
StacyZ StacyZ is offline
Junior Community Member
 
Join Date: Feb 2016
Location: San Diego, CA
Posts: 18
Default Re: Getting a Multi-Page PDF Resource to Work

Just in case anyone else has this problem and is looking for answers.

It turns out that this simple rule worked instead:

var r = new FusionProResource(Field("IMP6"), "graphic", true);
r.name = (Field("IMP6"));
r.pagenumber = CurrentRecordNumber()
if (r.exists) {
return r;
}
else {
return NullResource();
}
Reply With Quote
  #6  
Old February 19th, 2020, 10:03 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,502
Default Re: Getting a Multi-Page PDF Resource to Work

The key bit of info in your original post is that you're composing "a single PDF file with each record on one page." So yes, in that particular case, you need call out each page of the resource for each output record. Though I don't see why you would need an Overflow page at all in such a scenario.

The sample code in that other thread is for what is surely the far more common case of outputting multi-page records.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
Reply

Tags
german barcode, multi-page pdf, premium address, resouce

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:18 PM.


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