DLS Posted July 13, 2010 Share Posted July 13, 2010 I'm fairly new at this Fusion Pro and the first time i've been on a forum so please be patient with me. I need help with merging text files with a Pdf. I am trying to make a master Pdf with Graphic fields so that the data can be variable. That way when I get new text files in, I can just import the files into the master Pdf instead of having to make a new one every time. The text files I am using contain hundreds of names, addresses and barcodes. These are the instructions that i recieved from our contact- - Sure, not a problem. Here is what I did. Open the file, Blank.pdf. Define your data source (I am using a CSV file instead of a txt file not that it should make any difference), and click through the fields until you see the window with the Input Options button. Change the field type to Graphic for the graphic field. Click on Edit Rules. Select rule type as Graphic and select Insert Picture Rule from the rule template list, and click Next. Fill in all of the fields, and click OK. Click the Close button to close the Input Options dialog. Click on the Finish button. Create a new graphic frame. Using the black arrow, double click on the graphic frame to open the Graphic Frame dialog box. In the [Field or Rule] drop down box, select Insert Picture Rule. PDF file should fill the graphic frame. If it doesn't select the Preview Record Selector, click the Preview button and then the Refresh button. - I have followed all of these instructions and only once did it work, but we can't pinpoint why it only worked once and the other times nothing will appear after we hit the preview button or compose. We have tried these instructions over and over but it doesn't work. Can anyone help me? Link to comment Share on other sites More sharing options...
Dan Korn Posted July 13, 2010 Share Posted July 13, 2010 The Preview feature is very handy when you're making adjustments to the template, but it doesn't always tell you what's going wrong. Try doing an actual composition (with the Compose menu item or associated toolbar/palette control) and look at the log file. I bet there will be something in there that's a hint as to why you're not getting the output you expect. Link to comment Share on other sites More sharing options...
DLS Posted July 13, 2010 Author Share Posted July 13, 2010 Okay, I did compose the files but the error log is telling me that there is not a graphic resource named by the file I have chosen. It is also telling me that the Graphic is not found or is not processed properly. I have followed through with all the instructions I was given but I still can't get it right. Any ideas as to what i could be doing wrong? Any ideas would be greatly appreciated. Link to comment Share on other sites More sharing options...
Dan Korn Posted July 13, 2010 Share Posted July 13, 2010 If you're using a Graphic field, then the field value in the data references a named Graphic Resource, not (necessarily) the file name of a graphic file on disk. So you need to create a set of Graphic Resources in the Resources dialog for those data field values to match. (To open the Resources dialog, click on the "Create Resources" button on the Steps palette, or the "Edit Resources" button on the FusionPro toolbar, or from the menu, select FusionPro -> Data Definition -> Input Options and click "Edit Resources.") From the Resources dialog, click "Add," then type a name that matches one of the data values from your input file for the selected Graphic field and browse to the corresponding file on disk. Repeat this "Add" step for each named Graphic Resource called out by the data. Alternatively, if the data fields specify the full name of the graphic files on disk (probably with an extension such as ".jpg"), you can click the "Add Multiple" button on the Resources dialog, click "Select Files" on the next dialog, and then in the file dialog, hold down the Ctrl key (or the Command key on Mac) to multi-select the appropriate files. Another option, if the data values match the actual graphic file names, either with or without the extension, is to create a simple Graphic JavaScript rule with this syntax: return CreateResource(Field("YOUR FIELD NAME HERE"));Or, if the data values don't contain the extension, something like this: return CreateResource(Field("YOUR FIELD NAME HERE") + ".jpg");And select the rule's name in the "Field or Rule" drop-down in the Graphic Frame Properties palette. Note that if the graphics are not in the same location as your PDF template or your input data file, you may need to add the path to the graphics in the "Search Path" box on the Advanced tab of the Composition Settings dialog. Link to comment Share on other sites More sharing options...
Dan Korn Posted July 13, 2010 Share Posted July 13, 2010 Change the field type to Graphic for the graphic field. ... Click on Edit Rules. Select rule type as Graphic and select Insert Picture Rule from the rule template list, and click Next. Fill in all of the fields, and click OK. ... In the [Field or Rule] drop down box, select Insert Picture Rule. Okay, I'm rereading and noticing that you're using the "Insert Picture Rule" template, not a Graphic field directly. (You're setting the field to type Graphic, but that doesn't have any effect other than to let you select that field name in the "[Field or Rule]" drop-down list.) The problem with the "Insert Picture Rule" is that, if the graphic file specified in the data field is not found, the rule ignores it without putting out any kind of warning message and simply uses the default image. You only see a warning if the default image is not found, which may be a clue as to what's wrong (maybe the search path is wrong; I can't say without knowing more specifics). But instead of this "silent failure and default" behavior, you probably just want to use the actual graphic named in the data, or you want to see a warning message if it's not found. So I would use the simple JavaScript syntax in my previous post instead of that "Insert Picture Rule." I'll see if there's a simpler version of "Insert Picture Rule" that we can supply with FusionPro. Link to comment Share on other sites More sharing options...
DLS Posted July 23, 2010 Author Share Posted July 23, 2010 What you said would have worked but that wasn't the problem. We had tryed to go through the process more than once and in doing this we did not notice that every time we tried to import the same text file the resource would reset. So thats why we kept getting the blank page constantly. Thank you for your help and time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.