XML and PDF files

Post Reply
LasseThid
Member
Posts: 106
Joined: Tue Mar 03, 2015 2:30 pm

XML and PDF files

Post by LasseThid »

Is it possible to read data from an XML file containing information for more than one PDF file and then embed the data in the correct PDF file, or is it better to have one XML per PDF?

From an XML file like this...

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<order>
	<pof>ordernumber</pof>
	<system>client</system>
	<products>
		<product1>
			<filename>file_1.pdf</filename>
			<type>product_type</type>
			<quantity>qty</quantity>
			<paper>stock_name</paper>
			<color>front+back</color>
			<width>X</width>
			<height>Y</height>
			<weight>Z</weight>
		</product1>
		<product2>
			<filename>file_2.pdf</filename>
			<type>product_type</type>
			<quantity>qty</quantity>
			<paper>stock_name</paper>
			<color>front+back</color>
			<width>X</width>
			<height>Y</height>
			<weight>Z</weight>
		</product2>
		<product3>
			<filename>file_3.pdf</filename>
			<type>product_type</type>
			<quantity>qty</quantity>
			<paper>stock_name</paper>
			<color>front+back</color>
			<width>X</width>
			<height>Y</height>
			<weight>Z</weight>
		</product3>
	</products>
</order>
...I would like to embed the product1 data into file_1.pdf, the product2 data into file_2.pdf and so on.

If it's possible how do I do it?

Thanks in advance
Enfocus Switch 2017, Enfocus PitStop Server 13u2, HP SmartStream 12 & Kodak Prinergy 7.5 with Rules Based Automation
MAN Roland R705 & R708, KBA Rapida 205, HP Indigo 7600, 7800 & 10000, Inca OnsetX2, Durst P10 among other things
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Re: XML and PDF files

Post by dkelly »

Unless you want to write a custom javascript or XSL it would be easier to create a separate XML for each PDF.
LasseThid
Member
Posts: 106
Joined: Tue Mar 03, 2015 2:30 pm

Re: XML and PDF files

Post by LasseThid »

Thanks.

I'll have the customer generate one XML per PDF file then.
Enfocus Switch 2017, Enfocus PitStop Server 13u2, HP SmartStream 12 & Kodak Prinergy 7.5 with Rules Based Automation
MAN Roland R705 & R708, KBA Rapida 205, HP Indigo 7600, 7800 & 10000, Inca OnsetX2, Durst P10 among other things
Post Reply