RE: How to add image when using xml?

Hi,

I’m now using form.ImportXml(xmlInputStream) to merge data into pdf file, it is fine and straight forward for data but when come to image, how to put the image data inside the xml to perform the merge ? or we need to use other way to put image into particular tag place in the pdf file?

Cheers
Mark

Hi Mark,


Thanks for your inquriy. Please find sample XML with image data and PDF template form for reference. It will help you to accomplish the task.

Please feel free to contact us for any further assistance.

Best Regards,

Hi,

Thanks for reply, could you kindly inform me that what data is it in the xml? base64 or hex string for the byte array?

Cheers
Mark Wei

Hi,

I found the data is base64 string, can you kindly inform me that what field type for this image in pdf(it’s not text nor bottom), the field name of the example is Image Field but your xml node name is ImageField(without space), if I have 2 images in the same pdf document, would it cause any problem? thanks

Cheers
Mark

Hi,

Could you kindly guide me how to create your example test.pdf ? I have problem to build the pdf for xml merge. Thanks.

Cheers
Mark

Hi,

I’m now using form.ImportXml(xmlInputStream) to merge data into pdf, if using acrobat DC to add field in to pdf document then can use Test<… to map the fields, this works fine for text but if I want to put a image into pdf , how ? what type of field should I put in the pdf by Acrobat DC and how to map this image field with xml then?



Cheers
Mark Wei

Hi Mark,

Thanks for your feedback. It is good to know that you figured out the string type byte array. Please note above shared PDF form is dynamic PDF forum created using Adobe LiveCycle Designer.

However, I have noticed that when we create an Acro Form both using TextBoxField or Image field the Image data is not being [exported] and [imported] as XML data, so I have logged an investigation ticket PDFNET-41045 in our issue tracking system for further investigation. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,