Hi,
We've just started using Aspose product in order to replace another "PDF utility2" library. Our requirement is to replace some text in an existing PDF file and then print it.
The replaceText() works quite well (except for some cases, but that will be part of another post). The mian problem is that we are not able to open the document with PDFViewer for printing. In fact we are able to open any of our generated PDF document.
This is probably due to our PDF format. I have attached a sample PDF file. Trying to open it with the following code will hang in the openFile() method:
import com.aspose.pdf.kit.PdfViewer;
...
public class TestPrint {
/**
* @param args
* @throws Exception
* @throws PdfViewerException
*/
public static void main(String[] args) throws PdfViewerException, Exception {
String filename = "h:\\My Documents\\reporting\\test.pdf";
PdfViewer pdfviewer = new PdfViewer();
//The file is never open
pdfviewer.openPdfFile(filename);
...
}
Thanks,
oschir