Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 5th, 2019, 12:11 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 20
Default Output to Folder on Server

Mac 0S 10.14.4
FusionPro 10.1.9

I have a job that I would like to be composed as individual files and named from a data column then put on the Server in a specific folder.

Everything seems to work except the files do not go into the "ABOTA" folder on the server. I do have a folder created on the Server named ABOTA.

Please review my following rule set up as a Callback - On Record Start rule.


FusionPro.Composition.outputFileFullPathName = ("/Volumes/smb/192.168.200.72/Jobs/ABOTA/")

if (FieldChanged("Member No"))
FusionPro.Composition.OpenNewOutputFile(Field("Mem ber No") +
"." + FusionPro.Composition.outputFormatExtension);




Added note: (There is not a space between "Mem ber" the post keeps putting it there)

Last edited by LyndaEngelage; June 5th, 2019 at 12:15 PM..
Reply With Quote
  #2  
Old June 5th, 2019, 12:32 PM
ScottHillock ScottHillock is offline
Regular Contributor
 
Join Date: Mar 2010
Posts: 91
Default Re: Output to Folder on Server

Couple of things. First when making a post with code use the advanced editor, or use this:
HTML Code:
[CODE] --- Code goes here --- [/CODE]
Second, does that path "/Volumes/smb/192.168.200.72/Jobs/ABOTA/" even exist? If you open Finder and from the menu bar choose Go > Go to Folder... and then paste that in does it take you to the folder you're expecting?
__________________
FusionPro 9.3.36 - Acrobat 11 - macOS 10.14
Reply With Quote
  #3  
Old June 5th, 2019, 12:48 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 20
Default Re: Output to Folder on Server

Yes the path does exist. The files drop to:


/Volumes/smb://192.168.200.72/Jobs/


but I have a specific folder on the server named ABOTA.


How do I tell FusionPro to write to a specific folder on the server.


I thought adding "/ABOTA" would do it.



Screen Shot 2019-06-05 at 2.32.23 PM.png
Reply With Quote
  #4  
Old June 5th, 2019, 12:58 PM
ScottHillock ScottHillock is offline
Regular Contributor
 
Join Date: Mar 2010
Posts: 91
Default Re: Output to Folder on Server

Looks like the actual path you need is /Volumes/Jobs/ABOTA/

The smb://... is just the server address and not it's location in relation to the filesystem.

FusionPro.Composition.outputFileFullPathName expects a full path and file name.

And FusionPro.Composition.OpenNewOutputFile will output a file in the destination folder from the composition settings. I'm not too sure if these can be mixed. Dan Korn might be able to give more information.

Unless you're specifically trying to move different PDFs to different folders I'm not sure why you're trying this method though. Couldn't you just do the OpenNewOutputFile and point your composition output to the folder you want?

Edit:

Looks like you could just do:
Code:
if (FieldChanged("Member No")){
FusionPro.Composition.OpenNewOutputFile("/Volumes/Jobs/ABOTA/" + Field("Member No") + "." + FusionPro.Composition.outputFormatExtension);
}
__________________
FusionPro 9.3.36 - Acrobat 11 - macOS 10.14

Last edited by ScottHillock; June 5th, 2019 at 01:05 PM..
Reply With Quote
  #5  
Old June 5th, 2019, 04:20 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,322
Default Re: Output to Folder on Server

Quote:
Originally Posted by ScottHillock View Post
Looks like the actual path you need is /Volumes/Jobs/ABOTA/

The smb://... is just the server address and not it's location in relation to the filesystem.
The easiest way that I know of to get the full path to a file on Mac is to open up TextEdit, go into the menu and select Format -> Make Plain Text, then drag the file from the Finder into the TextEdit window.
Quote:
Originally Posted by ScottHillock View Post
FusionPro.Composition.outputFileFullPathName expects a full path and file name.

And FusionPro.Composition.OpenNewOutputFile will output a file in the destination folder from the composition settings. I'm not too sure if these can be mixed. Dan Korn might be able to give more information.
<Obi-Wan voice> Hello there!

You're correct, those do different things, in two different modes of what we call chunking, and they can't really be mixed.

The FusionPro.Composition.outputFileName and FusionPro.Composition.outputFileFullPathName properties can be set in the OnNewOutputFile rule, which is invoked for every output file (chunk) when the "Output to multiple files" box is checked on the Output tab of the Composition Settings. That's for what we call "static chunking," where every output file (chunk) contains the same number of records (unless you specify a different number for the very first record). This used to be the only way to compose to multiple output files. As the names of these two properties suggest, one is for specifying just a file name, in which case the file will be created in the same folder as the nominal output file (specified in the Composition Settings), and the other is for specifying a full path to the file.

The FusionPro.Composition.OpenNewOutputFile() function can be called in OnRecordStart, either unconditionally, to put each record into its own output file (chunk), or conditionally, based on any (arbitrary) condition the template designer wants, though usually it's triggered by something like a field value changing (like in this case). This is called "dynamic chunking" or "arbitrary chunking", where you can have any arbitrary number of records in each output file (chunk). This is a newer feature, which mostly supersedes the older static chunking. Note that you can specify either just a file name or a full path and file name in the call to FusionPro.Composition.OpenNewOutputFile(); if it's just a file name, then the file will be created in the same folder as the nominal output file (specified in the Composition Settings).

In this case, you're doing arbitrary chunking, where there's no set number of records per output file, so you need to use the latter approach.
Quote:
Originally Posted by ScottHillock View Post
Unless you're specifically trying to move different PDFs to different folders I'm not sure why you're trying this method though. Couldn't you just do the OpenNewOutputFile and point your composition output to the folder you want?
Well, yes, you do need to call FusionPro.Composition.OpenNewOutputFile(). But as noted above, you can decide whether to just give it a file name, in which case the file will be created in the same folder as the nominal output file specified in the Composition Settings, OR you can give it a full path, and the file will be created at that path (and you could also specify different folders for different output files if you want).
Quote:
Originally Posted by ScottHillock View Post
Edit:

Looks like you could just do:
Code:
if (FieldChanged("Member No")){
FusionPro.Composition.OpenNewOutputFile("/Volumes/Jobs/ABOTA/" + Field("Member No") + "." + FusionPro.Composition.outputFormatExtension);
}
That seems right to me, if you want to hard-code the output path in the rule. Or, you could set specify a file with that same path as the Output file for the job in the Composition Settings, then the rule can be just this:
Code:
if (FieldChanged("Member No"))
    FusionPro.Composition.OpenNewOutputFile(Field("Member No") + "." + FusionPro.Composition.outputFormatExtension);
I recommend the latter, especially since, if you forget to actually mount the SMB drive from the remote file server, you'll get an error message before you start composing. Also, if you want to change where the output goes, it's easier to change it in the Composition Settings than to find it in a rule. It's also more obvious for whomever might come along later and run this job and wonder why the output isn't going into the folder they're specifying in the Composition Settings.
__________________
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
  #6  
Old June 6th, 2019, 04:05 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 20
Default Re: Output to Folder on Server

On our system, no matter what we put in the composition settings, the files always go to the FusionPro Server. Is there a way to change this? We are using Producer Direct 10.

Last edited by LyndaEngelage; June 6th, 2019 at 04:07 AM..
Reply With Quote
  #7  
Old June 6th, 2019, 12:25 PM
ScottHillock ScottHillock is offline
Regular Contributor
 
Join Date: Mar 2010
Posts: 91
Default Re: Output to Folder on Server

I don't have any experience with Producer. I assumed we were talking about Creator.

The path name is going to be different than if it were on a Mac. I believe you'll need to have the share mapped to a drive and use "Z:\\ABOTA\\"

I'm sure there's some other way with string replacement to always get the jobs to go to your intended folder, but I don't have access to the documentation. This might be a case where you need to contact support.
__________________
FusionPro 9.3.36 - Acrobat 11 - macOS 10.14
Reply With Quote
  #8  
Old June 7th, 2019, 09:14 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,322
Default Re: Output to Folder on Server

Quote:
Originally Posted by LyndaEngelage View Post
On our system, no matter what we put in the composition settings, the files always go to the FusionPro Server. Is there a way to change this? We are using Producer Direct 10.
I'm confused a bit by your terminology, and I'm not sure I understand your workflow. Are you saying that you always submit the job to FusionPro Producer?

Anyway, yes, if you're composing via Producer, then things are a little different.

As mentioned before, if you specify a full path to the output file in a rule, that completely overrides whatever output file path you have specified in the Composition Settings. However, if you're composing to FusionPro Producer, that path in the Composition Settings gets overridden by the working folder path on the Producer Scheduler machine by default. This is by design, so that Producer can keep track of the output file and delete it when the rest of the job is deleted.

Long story short, when composing via Producer, unless you override the output path in a rule, your output file is always going to be made on the Producer machine.
__________________
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
  #9  
Old June 7th, 2019, 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,322
Post Re: Output to Folder on Server

Also, as Scott notes, when you're composing via Producer, the composition is happening on a Windows machine, so the path specification to a network drive folder will almost certainly be different than it is from your Mac. However, I think Scott is mistaken about using a mapped drive, because those are specific to logged-on users, while Producer jobs are composed in a Service context. So you'll need to figure out a valid UNC path to the file server for the Windows-based composition. UNC paths generally start with two backslashes, and since backslashes need to be escaped in JavaScript, you need four in a rule. Also, you'll need to consult with your own IT people to determine the correct UNC path, and they will have to make sure that the account under which the Producer jobs are running has write access to that path. (Our Support people can't manage your network settings.)

I can tell you that you can use the properties FusionPro.isMac and FusionPro.isWindows to do things conditionally in a rule based on the platform. (You can also switch off of FusionPro.Composition.isBatch to determine whether you're in a Server or Producer composition versus a Creator composition.) So, while, again, I can't tell you exactly what the UNC path on your network is, your rule probably needs to do something like this:
Code:
if (FieldChanged("Member No"))
{
    var fileName = Field("Member No") + "." + FusionPro.Composition.outputFormatExtension;

    var filePath = "/Volumes/Jobs/ABOTA/" + fileName; // Mac; volume must be mounted
    if (FusionPro.isWindows)
        filePath = "\\\\192.168.200.72\\Jobs\\ABOTA\\" + fileName; // Windows; UNC path must be available and writable by Producer

    FusionPro.Composition.OpenNewOutputFile(filePath);
}
__________________
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
individual pdfs, server, specific folder

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 09:36 AM.


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