ZDocBuilder Developer's Guide

Download ZDocBuilder Developer's Guide

ZDocGenerator

This object is used to generate Report/Doc.


Example with xml data source

// Create an Object
ZDocGenerator obj = new ZDocGenerator();
// Generate the report using xml input
obj.generateDocument("C:\\Users\\Desktop\\financeTemplate.docx", "C:\\Users\\Desktop\\sourceData.xml", "C:\\Users\\Desktop\\output.docx");

Download Full Example



Example with json source

// Create an Object
ZDocGenerator obj = new ZDocGenerator();
// Generate the report using json input
obj.generateDocument("C:\\Users\\Desktop\\financeTemplate.docx", "C:\\Users\\Desktop\\sourceData.json", "C:\\Users\\Desktop\\output.docx");

Download Full Example



Pdf/Text Comparison Libraries

Download Comparison Developer API Guide

ZPDFCompare

This object is used to compare two PDF files

// Create an Object
ZPDFCompare obj = new ZPDFCompare();
// Compare the pdf files
obj.pdfcompare("C:\\Users\\Desktop\\expectedFile.pdf", "C:\\Users\\Desktop\\actualFile.pdf", "C:\\Users\\Desktop\\expectedFile_Diff.pdf","C:\\Users\\tarun.kumar\\Desktop\\actualFile_Diff.pdf");


ZTextCompare

This object is used to compare two text files.

// Create an Object
ZTextCompare obj = new ZTextCompare();
// Compare the text files
obj.compare("C:\\Users\\Desktop\\expectedFile.txt", "C:\\Users\\Desktop\\actualFile.txt", "C:\\Users\\Desktop\\generated_Diff.html");


Pdf Convertor Libraries

Download Developer API Guide

GenericConvertor

This object is used to convert Word, Excel, PowerPoint, Publisher, Visio, Outlook, AutoCad, Images, Text, Html to PDF.

// Create an Object
GenericConvertor genericConv =new GenericConvertor();
// Covert to Pdf
genericConv.convert("C:\\Users\\Desktop\\input.doc","C:\\Users\\Desktop\\output.pdf");


WordToPdf

This object is used to convert ms-word document to pdf. This object contains many ms-word related features. WordToPdf only works with Word 2007 or higher version. Only Word 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. This add-in is available from Microsoft.

// Create an Object
WordToPdf wordToPdf = new WordToPdf();
// Covert to Pdf
wordToPdf.convert("C:\\Users\\Desktop\\input.docx","C:\\Users\\Desktop\\output.pdf");


ExcelToPdf

This object is used to convert Microsoft Excel to pdf. This object contains many Microsoft Excel related features. ExcelToPdf only works with Microsoft Excel 2007 or higher version. Only Excel 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. This add-in is available from Microsoft.

// Create an Object
ExcelToPdf excelToPdf = new ExcelToPdf();
// Covert to Pdf
excelToPdf.convert("C:\\Users\\Desktop\\input. xls","C:\\Users\\Desktop\\output.pdf");


PptToPdf

This object is used to convert Microsoft PowerPoint to pdf. PptToPdf only works with Microsoft PowerPoint 2007 or higher version. Only PowerPoint 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. This add-in is available from Microsoft.

// Create an Object
PptToPdf pptToPdf = new PptToPdf();
// Covert to Pdf
pptToPdf.convert("C:\\Users\\Desktop\\input.pptx","C:\\Users\\Desktop\\output.pdf");


PublisherToPdf

This object is used to convert Microsoft Publisher to pdf. PublisherToPdf only works with Microsoft Publisher 2007 or higher version. Only Publisher 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. This add-in is available from Microsoft.

// Create an Object
PublisherToPdf publisherToPdf = new PublisherToPdf();
// Covert to Pdf
publisherToPdf.convert("C:\\Users\\Desktop\\input.pub", " C:\\Users\\Desktop\\output.pdf");


OutlookToPdf

This object is used to convert Microsoft Outlook to pdf.

// Create an Object
OutlookToPdf outlookToPdf = new OutlookToPdf();
// Covert to Pdf
outlookToPdf.convert("C:\\Users\\Desktop\\input.msg", "C:\\Users\\Desktop\\output.pdf");


VisioToPdf

This object is used to convert Microsoft Visio to pdf. VisioToPdf only works with Microsoft Visio 2007 or higher version. Only Visio 2007 requires the free "Save as PDF or XPS" add-in for Office 2007 to be installed. This add-in is available from Microsoft.

// Create an Object
VisioToPdf visioToPdf = new VisioToPdf();
// Covert to Pdf
visioToPdf.convert("C:\\Users\\Desktop\\input.vsd", "C:\\Users\\Desktop\\output.pdf");


ImageToPDF

This object is used to convert images into PDF.

// Create an Object
ImageToPDF imageToPdf = new ImageToPDF();
// Covert to Pdf
imageToPdf.convert("C:\\Users\\Desktop\\input.jpg", "C:\\Users\\Desktop\\output.pdf");