#1
|
|||
|
|||
![]()
Hello, I'm having some issues with a tricky file I need to compose.
I have 2 documents and 1 set of data to use for both. Normally to pull up a page you could use a Field that has been defined in the data for that purpose, however there isn't one exactly for this case. Which 6-page document I use is determined by the value of the ASK field. ![]() Now I've set up an OnRecordStart rule that checks if there is a value in that field or not Like so: ![]() And the body pages like so: ![]() It seems pretty straightforward, if there is no value or a null value then the 6 body pages that will be composed for a record will be NO ASK-P1 through P6. However all I get are errors. ![]() What am I missing? |
#2
|
||||
|
||||
![]() Quote:
Those errors are about missing graphics, and have nothing at all to do with page usage. I'm not sure why you think those two things are connected. I would guess that it's simply a matter of your graphic file names being malformed. It looks like they're using the old-style HFS paths from Mac OS 9, with colons as directory separators. In modern versions of Mac OS X, you should use POSIX paths with forward slashes as directory separators instead. Specifically, instead of paths like "./2016 general proposal ask:no ask.pdf", they should be in the form of "./2016 general proposal ask/no ask.pdf". I don't know where in your job that path with the colon is coming from, though. (Also, I do appreciate the screen shots, and I do often say here on the forum that a picture is worth a thousand words. But in the case of the contents of a log file, or a rule, it's better to simply copy-and-paste the text instead of posting a picture of it. Or just attach a text file. That makes it easier for others to help because we can copy-and-paste the text contents on our end instead of having to try to re-type what's shown in a screen shot.) As for your rule itself, I think it's fine, although it's very repetitive, and can be reduced quite a bit. For one thing, you're already starting out with all the pages set to be unused, so you don't need any of the lines calling FusionPro.Composition.SetBodyPageUsage with the second parameter set to false. Also, you could do a simple iteration instead of 1 line for page 1, another line for page 2, another line for page 3, etc. For example, this should work just as well: Code:
for (var i = 1; i <= 6; i++) { if (Field("ASK")) FusionPro.Composition.SetBodyPageUsage("ASK-P" + i, true); else FusionPro.Composition.SetBodyPageUsage("NO ASK-P" + i, true); } Code:
for (var i = 1; i <= 6; i++) { var pageName = "ASK-P" + i; if (!Field("ASK")) pageName = "NO " + pageName; FusionPro.Composition.SetBodyPageUsage(pageName, true); } Code:
for (var i = 1; i <= 6; i++) FusionPro.Composition.SetBodyPageUsage((Field("ASK") ? "" : "NO ") + "ASK-P" + i, true);
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral 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)}); ![]() |
#3
|
|||
|
|||
![]()
None of my pages are resources or using graphic frames, do I need to make them into graphic frames? I don't see why I need to since I've had pages placed in a document before and called them out using the setbodypage.
The output file is blank pages with the fusion pro output from the data on them. ![]() |
#4
|
||||
|
||||
![]() Quote:
What version of FusionPro are you using? I think I recall a quirk in previous versions of FusionPro that had difficulty dealing with template file names with capital letters in them. Is your file all lower cased – as it's listed in the message log? Is that colon (:) part of the file name? It might be worth trying to rename your template something simple like "test.pdf" and trying to recompose. I also wanted to mention that you can toggle body pages by page number in FP8 and FP9 – I'm not sure about 7... Code:
for (var i=1; i<=6; i++) FusionPro.Composiiton.SetBodyPageUsage(i + !Field('ASK') * 6, true) console.log(i + !Field('Ask') * 6) Code:
var pg = 7; while (--pg) FusionPro.Composiiton.SetBodyPageUsage(pg + !Field('ASK') * 6, true);
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#5
|
|||
|
|||
![]()
Suppress static is unchecked and I'm on v9.0.3. I regularly have capitalized page names but I tried making them all lower-case but the same results occur.
It's like it wants a resource called no ask.pdf and ask.pdf to use for the body pages but why? If I already have a static background to use and all I'm doing is telling it which 6 pages to use per record. |
#6
|
||||
|
||||
![]()
Maybe it's a permissions issue with that particular PDF or something. It's really difficult to say based on a couple of screenshots. Can you collect and upload your template/data?
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#7
|
|||
|
|||
![]() Quote:
https://dl.dropboxusercontent.com/u/...3ANO%20ASK.zip |
#8
|
|||
|
|||
![]()
Remove the slash / from the filename so it is "2016 General Proposal ASKNO ASK.pdf".
The slash is being treated like a directory separator, and is being replaced with the Mac seperator ":", on composition. Usually I try and keep file names as simple and short as possible, and all lower case. |
#9
|
|||
|
|||
![]() Quote:
|
#10
|
||||
|
||||
![]() Quote:
At any rate, my initial suspicion was correct: The problem had absolutely nothing at all to do with page usage or anything else in your rules.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral 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)}); ![]() |
![]() |
Tags |
composition, onrecordstart, pages |
Thread Tools | Search this Thread |
Display Modes | |
|
|