Aloaha XML Merger

With the Aloaha PDF Saver API Version it is possible to merge an XML file containing the PDF Form Values with the PDF itself to one File.

To be able to access the functions please create the object. 

Dim PDF
set PDF = createobject("aloahapdf.edit")


Then you need to load the PDF File into the Memory.

If PDF.load_pdf_to_mem(cstr("c:\form.pdf")) =true then
          msgbox "Form loaded to memory"
          if PDF.FormFields>0 then
                    msgbox "PDF is Form"
          else
                    msgbox "PDF is not a Form"
                    call PDF.unload_pdf_from_mem 
          end if
else 
          msgbox "Could not load Form to memory"
end if
 


Now call the merge Function (with XML File on disk)

if PDF.merge_pdf_with_xml(cstr(""),cstr("c:\formdata.xml"), cstr("c:\targetpdf.pdf"))=true then
         msgbox "PDF Merge OK"
else
         msgbox "PDF Merge Failed"
end if


or

The merge Function (with XML Data in Memory)

if PDF.merge_pdf_with_xml(cstr(XMLData),cstr(""), cstr("c:\targetpdf.pdf"))=true then
          msgbox "PDF Merge OK"
else
          msgbox "PDF Merge Failed"
end if



Now please clean up the memory and call unload_pdf_from_mem





Aloaha Software / Knowledge Base / PDF Form Saver SDK / Merge XML with PDF
create PDF Software

Merge XML with PDF

Any questions?
Aloaha Software - Merge XML with PDF
ProductsKnowledge BaseShopSupportPress
Deutsche VersionEnglish version