Jump to content

Issue with OnNewOutPutFile Callback Rule


Recommended Posts

(Originally from user Dsweet)

 

Hello,

 

Did a quick search for OnNewOutputFile and only got this thread as a response.

 

I will be having a recurring project that will be fed nearly 100,000 or so records at a time and the desire is to create separate output pdf files for each record based on unique field entries in the data file. I thought that this would be tailor-made for this callback rule. However I have one major glitch in the process. The rule works on my desktop version, but not on the server? Both Acrobat and FusionPro are the same version (Acrobat 8.1.2 - FusionPro 4.2P1d) with the only difference being I'm working on Widows XP Pro and the server is Windows 2000 (sp4 installed).

 

I've tried both the full pathname and the basic output file version of this callback rule and get the same results with each. This is the coding for the two versions of the rule that I used...

 

basic...

FusionPro.Composition.outputFileName = Field("jobID") + "_testFile_" + Field("Market Code") + ".pdf";

 

full pathname...

FusionPro.Composition.outputFileFullPathName = "D:\\fusionProJobs\\testBatch\\" + Field("jobID") + "_testFile_" + Field("Market Code") + ".pdf";

 

I've put report message lines at the entrance and exit of the rule to help track the composition. I've also made certain that the path is acurate for both systems. I had my computer drives remapped to match the drive letters for the servers that we use. I've also tried the unc path name thinking that it still might be possible that a location error might occur. Still the same result.

 

When I compose the template on my desktop, the message file contains the following...

Job started 13:48:56 - 1223920136.

OnNewOutputFile, line 1: Entered OnNewOutputFile

OnNewOutputFile, line 3: Exited OnNewOutputFile

Begun composing record #1

OnNewOutputFile, line 1: Entered OnNewOutputFile

OnNewOutputFile, line 3: Exited OnNewOutputFile

Begun composing record #2

OnNewOutputFile, line 1: Entered OnNewOutputFile

OnNewOutputFile, line 3: Exited OnNewOutputFile

Begun composing record #3

OnNewOutputFile, line 1: Entered OnNewOutputFile

OnNewOutputFile, line 3: Exited OnNewOutputFile

Begun composing record #4

OnNewOutputFile, line 1: Entered OnNewOutputFile

OnNewOutputFile, line 3: Exited OnNewOutputFile

 

...and so on through to the end of the data file - just as I would expect. However the same file that is created on server contains...

 

Job started 13:52:44 - 1223920364.

 

... and that's it! The only message that I do get is in the command window when I envoke FusionPro and it states...

 

Composing Document...

Reading input

Reading input

Reading input

 

*****

FusionPro has encountered a fatal error and must abort.

If the problem persists, please call Printable Technical Support.

*****

 

It appears that FusionPro doesn't even get to the callback rule at all or the entrance message would have been contained in the file. I've gone this route last year with Printable Technical Support, and even sent them files to work on. I'm still waiting to hear back from them.

 

I just wondered if anyone can see a problem in my coding, or if someone else has had this situation and figured a solution to it. I REALLY don't want to have to do this project via a desktop composition. This is why we bought the server version for in the first place.

__________________

David A. Sweet

Variable Data Specialist

HKM Direct Market Communications

Link to comment
Share on other sites

There has to be something about the path you are defining. I took the job and changed the output path to C:\Temp\Output (since that exists on my computer) and it worked. I made no other changes (including to the filename - just the path).

 

JavaScript is case-sensitive - is the capitalization of the actual directory name the same as it is on the server?

 

http://forums.printable.com/picture.php?albumid=1&pictureid=6

Link to comment
Share on other sites

(Originally from user Dsweet)

 

It also works on my computer (desktop version only), but not on our server via a command line. That's my problem -- I don't want to process 100,000 or more records at a time using my desktop alone. This small process took about 15 seconds to do 26 records. Image how long it would take to do the full 100,000! That would be over 16 hours to do this on my desktop - assuming a constant process speed and that the actual pdf files won't be any bigger than the sample files of 140k. A full day of time that I lost since I can't use the FusionPro server version for this. I'm assuming that it would compose faster on server, as well as the facts that being on server we could automate the process and it wouldn't tie up my computer and time for the full day.

 

I'm beginning to wonder why we purchased the server version at all if it doesn't function in the same manner as the desktop version does. It seems that we might have done just as good to purchase several standalone software packages and just linked them to several computers to do the processing.

Link to comment
Share on other sites

The problem here is not related to the OnNewOutputFile Callback Rule. The same crash occurs even without that particular rule.

 

This is actually a manifestation of a bug which causes a crash (in FP Server but not in Desktop :() when using the FusionProResource.pagenumber property in a rule (any rule, not just a callback) in conjunction with chunking (Output to multiple files).

 

I apologize for the trouble. We are working on a solution to this problem. You may reference case FP-11043 in any follow-ups.

Edited by Dan Korn
clarification
Link to comment
Share on other sites

Hello,

 

Here is a workaround to your problem. I hope it is acceptable for you as a short term solution till we fix the issue in FusionPro.

 

In your rules that reference the PDF resources, at the very beginning, you can put in something like:

if (CurrentRecordNumber() == 1)
   return NullResource();

You will need to add this to both of your graphic rules. This will make the 1st record invalid. If you want to chunk by 1 record, your first output needs to be discarded. If you chunk by other numbers, use the feature to set the first chunk to be different from others.

 

Hope you can use this as a workaround.

 

Ching Yue

Printable Technologies

Edited by Dan Korn
Fixed spelling of CurrentRecordNumber; added [code] block
Link to comment
Share on other sites

  • 3 years later...
Was this bug ever fixed?

Yes, the crash to which the earlier posts were referring, referenced as case FP-11043, was fixed a while ago, back in FusionPro 7.1.

I am currently having the same problem when I try to use a server path when I output the file.
No, you're not having the same problem. As I mentioned in my previous post, the crash the original poster was seeing actually didn't have anything to do with the OnNewOutputFile Callback Rule. And it was only an issue in FP Server, not FP Desktop. Plus, the symptom wasn't just that the files couldn't be written, it was a program crash. So, while you are definitely having a problem (although you haven't really specified exactly what it is), I'm certain that you're not having the same problem as in the original post.

I am able to output the file to my c:\ drive but not any server.

What exactly are you not able to do on the server? Do the output files not get created at all? Are there any relevant messages in the composition log (.msg) file?

 

Without seeing your job or knowing more about your network architecture, or exactly what kind of failure mode you're seeing, let alone what version of FusionPro and operating system you're using, I can't do anything but guess as to the cause of your issue. That said, the most likely causes of your issue are:

 

  1. You haven't properly specified the network path in your rule. In JavaScript, backslashes have to be escaped with double backslashes, so a UNC path which starts with two backslashes has to be escaped with four backslashes. For example:
    FusionPro.Composition.outputFileFullPathName = "\\\\server\\share\folder\\" + Field("foo") + ".pdf";


  2. The network path specified is incorrect.
  3. You don't have write access to the network share from the account under which the composition is running. If you're using FusionPro VDP Producer via DL Queue or some other server-based application, then you need to make sure the account under which the composition is running has write access.

In any case, the .msg file should offer some clue as to what's going wrong.

Edited by Dan Korn
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...