XML and PDF files
Posted: Wed May 27, 2015 4:03 pm
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...
...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
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>
If it's possible how do I do it?
Thanks in advance