Hi
Can iset the dimensions of the PDF page to be generated from doc,docx,rtf etc via the Document or the PDFOptions objects. If yes, how? My code snippet is as follows:
public boolean convert(String fileName)
{
Document doc;
outputFileName = fileName + ".pdf";
try
{
doc = new Document(fileName, format, null);
PdfOptions options = new PdfOptions();
options.setHeadingsOutlineLevels(3);
options.setExpandedOutlineLevels(1);
doc.saveToPdf(0, 1, outputFileName, options);
}
catch (Exception e)
{
System.*out * .println("Exception occurred while file conversion to pdf.");
e.printStackTrace();
}
return false;
}
I am getting the PDF page with a standard size of
Height= 792.0 Width= 612.0 for all formats(doc, docx).