Free Support Forum - aspose.com

Null Pointer

Hello,

I get NullPointer when I run this, does anyone know why?

Document is = new Document(new FileInputStream("TEST.docx"));

PrinterSettings ps = new PrinterSettings();

ps.setOutputFile("D:/vcojocar052115/myfile2.prn");

is.print(ps);

java.lang.NullPointerException

at asposewobfuscated.hh.a(GdiRenderer.java:176)

at asposewobfuscated.s.a(ApsGlyphs.java:48)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.z.a(ApsPage.java:75)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.hh.a(GdiRenderer.java:49)

at asposewobfuscated.hh.a(GdiRenderer.java:135)

at com.aspose.words.Document.renderToSize(Document.java:1497)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:86)

at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1936)

at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)

at sun.print.PSStreamPrintJob.pageableJob(PSStreamPrintJob.java:385)

at sun.print.PSStreamPrintJob.print(PSStreamPrintJob.java:308)

at com.aspose.words.PrintUtilities.a(PrintUtilities.java:178)

at com.aspose.words.PrintUtilities.printToFile(PrintUtilities.java:75)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:115)

at com.aspose.words.Document.print(Document.java:1592)

at com.aspose.words.Document.print(Document.java:1567)

at com.itec.printing.batch.DocumentReader.main(DocumentReader.java:66)

java.lang.NullPointerException

at asposewobfuscated.hh.a(GdiRenderer.java:176)

at asposewobfuscated.s.a(ApsGlyphs.java:48)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.z.a(ApsPage.java:75)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.hh.a(GdiRenderer.java:49)

at asposewobfuscated.hh.a(GdiRenderer.java:135)

at com.aspose.words.Document.renderToSize(Document.java:1497)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:86)

at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1964)

at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)

at sun.print.PSStreamPrintJob.pageableJob(PSStreamPrintJob.java:385)

at sun.print.PSStreamPrintJob.print(PSStreamPrintJob.java:308)

at com.aspose.words.PrintUtilities.a(PrintUtilities.java:178)

at com.aspose.words.PrintUtilities.printToFile(PrintUtilities.java:75)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:115)

at com.aspose.words.Document.print(Document.java:1592)

at com.aspose.words.Document.print(Document.java:1567)

at com.itec.printing.batch.DocumentReader.main(DocumentReader.java:66)

java.lang.NullPointerException

at asposewobfuscated.hh.a(GdiRenderer.java:176)

at asposewobfuscated.s.a(ApsGlyphs.java:48)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.z.a(ApsPage.java:75)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.hh.a(GdiRenderer.java:49)

at asposewobfuscated.hh.a(GdiRenderer.java:135)

at com.aspose.words.Document.renderToSize(Document.java:1497)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:86)

at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1936)

at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)

at sun.print.PSStreamPrintJob.pageableJob(PSStreamPrintJob.java:385)

at sun.print.PSStreamPrintJob.print(PSStreamPrintJob.java:308)

at com.aspose.words.PrintUtilities.a(PrintUtilities.java:178)

at com.aspose.words.PrintUtilities.printToFile(PrintUtilities.java:75)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:115)

at com.aspose.words.Document.print(Document.java:1592)

at com.aspose.words.Document.print(Document.java:1567)

at com.itec.printing.batch.DocumentReader.main(DocumentReader.java:66)

java.lang.NullPointerException

at asposewobfuscated.hh.a(GdiRenderer.java:176)

at asposewobfuscated.s.a(ApsGlyphs.java:48)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.z.a(ApsPage.java:75)

at asposewobfuscated.p.a(ApsCompositeNode.java:22)

at asposewobfuscated.m.a(ApsCanvas.java:18)

at asposewobfuscated.hh.a(GdiRenderer.java:49)

at asposewobfuscated.hh.a(GdiRenderer.java:135)

at com.aspose.words.Document.renderToSize(Document.java:1497)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:86)

at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1964)

at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)

at sun.print.PSStreamPrintJob.pageableJob(PSStreamPrintJob.java:385)

at sun.print.PSStreamPrintJob.print(PSStreamPrintJob.java:308)

at com.aspose.words.PrintUtilities.a(PrintUtilities.java:178)

at com.aspose.words.PrintUtilities.printToFile(PrintUtilities.java:75)

at com.aspose.words.AsposeWordsPrintDocument.print(AsposeWordsPrintDocument.java:115)

at com.aspose.words.Document.print(Document.java:1592)

at com.aspose.words.Document.print(Document.java:1567)

at com.itec.printing.batch.DocumentReader.main(DocumentReader.java:66)

Hi Cojocaru,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v15.5.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v15.5.0 and let us know how it goes on your side. I hope, this will help.

Hello,

Indeed we have a license for 10.4.0.0.

I've tried to get a temporary license for Aspose.Words latest version to test it on my pc but the "

Temporary License Request Information

"

page is empty.

Can you please give me a hand at this ?

Valentin

Hi Valentin,

Thanks for your inquiry. You can request again for temporary license from here:
http://www.aspose.com/corporate/purchase/temporary-license.aspx

Please let us know if you still face any issue.