Hey guys I’ve been having some problems with Aspose PDF for Java trying resize some documents for example this one 1-1141497.pdf (945.7 KB)
here is the code that reproduces the problem
@Test
public void redimensionnerDocument() throws FileNotFoundException {
Document document = new Document(new FileInputStream(“C:\Convergence\11414907.pdf”));`
PdfFileEditor fileEditor = new PdfFileEditor();
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
PdfFileEditor.ContentsResizeValue.percents(10), null, PdfFileEditor.ContentsResizeValue.percents(10),
PdfFileEditor.ContentsResizeValue.percents(10), null, PdfFileEditor.ContentsResizeValue.percents(10));
fileEditor.resizeContents(document, parameters);
}
logs for the exception
java.lang.NullPointerException
at com.aspose.pdf.facades.APdfFileEditor.resizeContents(Unknown Source)
at com.aspose.pdf.facades.PdfFileEditor.resizeContents(Unknown Source)
at com.aspose.pdf.facades.APdfFileEditor.resizeContents(Unknown Source)
at com.aspose.pdf.facades.PdfFileEditor.resizeContents(Unknown Source)