Using XML to Create a Text Mark

Post Reply
John.Dean
Newbie
Posts: 8
Joined: Thu May 23, 2013 3:00 pm

Using XML to Create a Text Mark

Post 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.
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Using XML to Create a Text Mark

Post 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
John.Dean
Newbie
Posts: 8
Joined: Thu May 23, 2013 3:00 pm

Using XML to Create a Text Mark

Post 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.
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Using XML to Create a Text Mark

Post by dkelly »

Use Switch's "Text with variables" and select the appropriate XML node or attribute.
John.Dean
Newbie
Posts: 8
Joined: Thu May 23, 2013 3:00 pm

Using XML to Create a Text Mark

Post 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.
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Using XML to Create a Text Mark

Post by dkelly »

Make sure you select External XML



John.Dean
Newbie
Posts: 8
Joined: Thu May 23, 2013 3:00 pm

Using XML to Create a Text Mark

Post 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.
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Using XML to Create a Text Mark

Post 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
Post Reply