PDF Kit - Java - Word to PDF Conversion and Printing

Hi,

We are trying to print a Word & PDF document silently using Aspose PDF Kit's Print Method. Since Aspose Words for Java does not have interfaces for silent printing, we convert WORD to PDF and then use Print method

pdfviewer.setPrintPageRange(startPage,endPage);

//sets the page format for each page between startPage and endPage.

for(int page = startPage; page > endPage + 1; page++)

pdfviewer.setPageFormat(page,pf);

//queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document.

printJob.setPageable(pdfviewer);

//prints a set of pages.

printJob.print();

But the data in the printout has junk characters. looks like the text overlaps. Please see attachments

Hi Raji,

Please share the input PDF files along with the complete code snippet with us, so we could test the issue at our end and guide you accordingly. Also, please provide some more details regarding your working environment i.e. OS, Java version etc.

We’re sorry for the inconvenience.
Regards,