INGuser Posted April 12, 2013 Share Posted April 12, 2013 I have three questions: 1) Is there a way to create a continuous page number within FP VDP Creator? I have a job that I am setting up where I have 4 output pages and 80 names. The page number on my last page of the document should be 320. 2.) Is there a way to output a fixed width text file within FP VDP Creator based on fields in my data file along with static information and my output file name? I am trying to make a index file to go with my jobs for our imaging department. 3.) Is there a way to output a text file within FP VDP Creator based on the number of pages in the output file, number of sheets per output file(this is number of pages in the output file/Print Plex), and number of envelopes per file (Sequence # of last record - Sequence # of first record)? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 12, 2013 Share Posted April 12, 2013 (edited) 1) Is there a way to create a continuous page number within FP VDP Creator? I have a job that I am setting up where I have 4 output pages and 80 names. The page number on my last page of the document should be 320. Yes. In the OnPageNumber callback rule, do this: return FusionPro.Composition.pageNumberInJob;Then the $pagenum variable will output that number. Alternately, you can create any JavaScript text rule with that same syntax, and check the "Re-evaluate this rule for every text flow" box. Then you can use that rule's name as a variable to return the page number. 2.) Is there a way to output a fixed width text file within FP VDP Creator based on fields in my data file along with static information and my output file name? I am trying to make a index file to go with my jobs for our imaging department. No. This suggests a workflow using FusionPro VDP Producer API (FusionPro Server), driven by a different application, such as a Web-to-Print system, which writes the data file for FusionPro, as well as writing any other tracking information to a file or a database. 3.) Is there a way to output a text file within FP VDP Creator based on the number of pages in the output file, number of sheets per output file(this is number of pages in the output file/Print Plex), and number of envelopes per file (Sequence # of last record - Sequence # of first record)? Not exactly. But you can create an XML log file, which has most of that information. In OnJobStart, call FusionPro.Composition.CreateXMLLogFile(). You can give it a file path and name as a parameter, otherwise it will generate a file next to your main composition log (.msg) file. You can also call FusionPro.Composition.LogXMLMetadata() from any rule to add custom metadata to the XML log file. Edited April 12, 2013 by Dan Korn typo Quote Link to comment Share on other sites More sharing options...
INGuser Posted April 15, 2013 Author Share Posted April 15, 2013 thanks for the responses Dan. Is there a way to format the pagenumber so that it would be six digits? I tried this but got an error: Format pageNumberInJob("000000"); return FusionPro.Composition.pageNumberInJob; Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 15, 2013 Share Posted April 15, 2013 thanks for the responses Dan. Is there a way to format the pagenumber so that it would be six digits? I tried this but got an error: Format pageNumberInJob("000000"); return FusionPro.Composition.pageNumberInJob; Yeah, that's not valid syntax. Try this: return FormatNumber("000000", FusionPro.Composition.pageNumberInJob); Quote Link to comment Share on other sites More sharing options...
dennis.wolfers Posted August 20, 2013 Share Posted August 20, 2013 I'm attempting to use FusionPro.Composition.pageNumberInJob to determine whether an output page is odd as I need a logo to appear on odd pages only. The problem is that the graphic frame appears on an overflow page, and despite checking the "Re-evaluate this rule for every graphic frame" checkbox, the evaluation appears to happen just once, and the logo appears on all subsequent overflow pages. For instance, I wrote a rule that returns the logo on page 5, and it did appear on page 5, but also on all subsequent overflow pages for that record. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 20, 2013 Share Posted August 20, 2013 I'm attempting to use FusionPro.Composition.pageNumberInJob to determine whether an output page is odd as I need a logo to appear on odd pages only. The problem is that the graphic frame appears on an overflow page, and despite checking the "Re-evaluate this rule for every graphic frame" checkbox, the evaluation appears to happen just once, and the logo appears on all subsequent overflow pages. For instance, I wrote a rule that returns the logo on page 5, and it did appear on page 5, but also on all subsequent overflow pages for that record. How exactly are you controlling whether the logo appears or not? Can you post the exact syntax of your rule? Anyway, this worked for me: I started with the Frodo Travel tutorial, set up an overflow page, with a text frame marked as "Overflow to", and a graphic frame pointing to this Graphic rule: if (FusionPro.Composition.pageNumberInJob % 2) return CreateResource("assets/frodo.tif"); //else return NullResource();And I set the frame at the bottom of the second page to overflow to the Overflow page, in pairs. I composed one record, and voila! The picture appears only on the odd-numbered Overflow pages. Quote Link to comment Share on other sites More sharing options...
dennis.wolfers Posted August 20, 2013 Share Posted August 20, 2013 Hi Dan, Thank you for all of your help. I've been able to answer many of my own questions by reading your posts in various threads, and when I have to ask, you've gotten right back to me! I've attached my project and output PDF. Hopefully my code doesn't make you cringe too much. I was using similar code to what you suggested (in the Logo rule). I modified it to more closely match yours, but still got unexpected results. On a separate note (in the OnRecordStart rule), I am perplexed by the need to use hard-coded leading settings in the section of code that starts on line 107, compared to what I use in the section that starts on line 85. These two sections reproduce the same information, but end up formatted differently without the forced leading settings in the second section. DennisVDP odd test Layout.zip80571 logo test.pdf Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 21, 2013 Share Posted August 21, 2013 I've attached my project and output PDF. Hopefully my code doesn't make you cringe too much. I was using similar code to what you suggested (in the Logo rule). I modified it to more closely match yours, but still got unexpected results. On a separate note (in the OnRecordStart rule), I am perplexed by the need to use hard-coded leading settings in the section of code that starts on line 107, compared to what I use in the section that starts on line 85. These two sections reproduce the same information, but end up formatted differently without the forced leading settings in the second section. You didn't include any of the external data files ("Nevada - SIP.txt" etc.) in the collected job, so there's no content when I compose. I can't really do much to analyze the job without at least one of those data files. Quote Link to comment Share on other sites More sharing options...
dennis.wolfers Posted August 21, 2013 Share Posted August 21, 2013 Sorry about that, I've attached a few of them to this post.external data files.zip Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 22, 2013 Share Posted August 22, 2013 Sorry about that, I've attached a few of them to this post. Okay, thanks. The problem is on the last line of your "Logo" rule. Instead of this: return NullResource; It should be this: return NullResource(); Quote Link to comment Share on other sites More sharing options...
dennis.wolfers Posted August 22, 2013 Share Posted August 22, 2013 Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.