View Single Post
  #4  
Old March 15th, 2019, 03:32 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,369
Default Re: Original Input File Name Path

Thanks for that information. However, I'm still a bit confused as to exactly what workflow you're using. You say the job is "sent to the API server", which implies FP VDP Server (API), but you also say, "it's sent to a producer server," which implies FP VDP Producer, a completely different product. Can you elaborate a bit on exactly what you do (i.e. what you click on) to "send" the job? Sorry to be picky, but I need to nail this down, because what I suggest as a solution would be different depending on your product and workflow.

Also, I'm a bit fuzzy about exactly what is in your DEF file that you're trying to extract. Can you post the full <DataSource > section of your DEF file (the first 15 lines or so)?

In addition, can you supply the context of the rule that's calling the JavaScript function you posted? Specifically, what are you passing to it as the template_name parameter?

Or, the questions in my previous two paragraphs can be answered by posting the collected job (without the fonts).

As for wanting to know the PDF template file path, that also depends on the workflow. There is definitely a way to retrieve that in a FusionPro Server workflow, but it's harder with Producer. If you can elaborate on what you are trying to do with the template file path, that would be helpful as well.

I can tell you, at least in a general/philosophical sense, that FusionPro is not designed to rely on knowing either the names or paths of any of the files you mention. You can have a perfectly valid FusionPro job that has no input data file at all, with the "None" input option, or a job that uses an abstract ODBC data source. Likewise, you can have a perfectly valid FusionPro job with no "background" or "template" PDF file at all. For that matter, with FP Server, you don't even technically need a Data Definition file, as the older DL Formatter product which was the precursor to FusionPro didn't even have that concept, and just did a more basic data merge, without any rules, using a tagged markup data file, a DIF file, and a CFG file.

Furthermore, FusionPro is designed so that most jobs can be transferred, collected, and composed on any computer anywhere, even with swapping in new data, in generic workflows which don't rely upon specific file paths or naming conventions. It's also designed with custom workflows and applications in mind, especially with FP Server, where other apps can customize almost any aspect of a FusionPro job. Following on that, while you can write rules which do things based on file paths, it's hard for us to anticipate every possible such workflow. Therefore, we can't support everything under the sun without some custom programming, and that kind of programming is often more appropriately done outside of FusionPro, in another application which handles its own business logic to modify the data, and possibly the layout (via the DIF API), then invokes FusionPro with those parameters, rather than putting that kind of business logic into JavaScript rules in a FusionPro template. Whether your requirements fall into that category is not yet completely clear to me, but it sounds like you're heading in that direction.
__________________
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