Page 1 of 1
Using XML to Create a Text Mark
Posted: Thu May 23, 2013 3:06 pm
by John.Dean
I am trying to read an XML, use tags (ie. Customer Name, Print Quantity, Trim Size) and place these text strings in the PDF. Essentially, I am place identification and basic job information from an XML as mark on the PDF file before it gets imposed.
I have created custom variables in Pitstop server and in Switch (Submit Point variables) but I am unsure how to place that text on the correct PDF. All jobs arrive in one hot folder and the XML files for those jobs into another.
Thanks in advance.
Using XML to Create a Text Mark
Posted: Fri May 24, 2013 4:54 pm
by dkelly
You can create a pitstop action to place the text object at a fixed location. The text and position can be set from Switch variables. Make sure the X & Y position variables are the "Length" type.
Note: I've encountered problems with X & Y position values passed from Switch not matching same positions if values were set in Pitstop. I had to add an offset to get it to work. I believe this problem was fixed in v11 update 4 but I have not verified.
If you need more sophisticated PDF assembly take a look at Apago's PDF Constructor. We have built some pretty complex documents in Switch using it.
Dwight Kelly
Apago, Inc.
dkelly@apago.com
Using XML to Create a Text Mark
Posted: Fri May 24, 2013 9:27 pm
by John.Dean
Dwight,
Thanks. I will pursue that avenue. I need to read and XML tag that contains Customer Name, for instance. Then place that text on the PDF. I guess what it comes down to is that I'm not sure what I am missing when I am trying to retrieve that XML tag and where to reference that variable. I'll keep looking and reading over the Enfocus documentation.
We have Apago PDF Enhancer available, but I don't think we have PDF Constructor.
Using XML to Create a Text Mark
Posted: Fri May 24, 2013 9:58 pm
by dkelly
Use Switch's "Text with variables" and select the appropriate XML node or attribute.
Using XML to Create a Text Mark
Posted: Wed May 29, 2013 5:13 pm
by John.Dean
I think I am having trouble with the XML schema. When building a location path using a sample job, the XML file does not display the nodes as expected. I have reduced the XML file to a simple dataset and produced the same issue. I will find a solution and report back here.
Thank you again for your help.
Using XML to Create a Text Mark
Posted: Wed May 29, 2013 7:56 pm
by dkelly
Make sure you select External XML
Using XML to Create a Text Mark
Posted: Wed May 29, 2013 8:02 pm
by John.Dean
Thank you.
I've figured that part out this morning. My XML was poorly structured. Now, I am trying to associate those tags with text marks that I am adding via a Pitstop server action.
I appreciate your help.
Using XML to Create a Text Mark
Posted: Wed May 29, 2013 8:34 pm
by dkelly
Add a Pitstop Server flow element to your Switch flow
Create a variable set in Pitstop Server
Create a variable of type "Text with Variables" "Text"
Select the XML path to the value you want to use
Create an action in Pitstop to Place Object of type Text
Enable Switch variables in Action editor
Select the variable created earlier
Select the action in Pitstop Server element in your flow