When saving the attached document to pdf we get a NullPointerException. What’s wrong with that document?
The code:
import com.aspose.words.Document;
public class ErrorSavingPdf {
public static void main(String[] args) throws Exception {
Document doc = new Document("c:/tmp/aspose/aspose-error.doc");
doc.save("c:/tmp/aspose/aspose-error.pdf");
}
}
The Stacktrace:
Exception in thread "main" java.lang.NullPointerException
at com.aspose.words.qk.ex(FloaterFrame.java:252)
at com.aspose.words.qk.jr(FloaterFrame.java:211)
at com.aspose.words.qk.Gn(FloaterFrame.java:63)
at com.aspose.words.asq.a(ShellPart.java:127)
at com.aspose.words.asr.asY(ShellReflower.java:291)
at com.aspose.words.asr.a(ShellReflower.java:59)
at com.aspose.words.cg.BJ(ColumnReflower.java:194)
at com.aspose.words.cg.c(ColumnReflower.java:39)
at com.aspose.words.ajt.p(PageReflower.java:109)
at com.aspose.words.ajt.h(PageReflower.java:52)
at com.aspose.words.aki.w(PartReflower.java:31)
at com.aspose.words.aub.fq(StoryLayout.java:95)
at com.aspose.words.fj.aC(DocumentLayoutBuilder.java:165)
at com.aspose.words.fi.Gn(DocumentLayout.java:215)
at com.aspose.words.wv.a(LayoutDocument.java:51)
at com.aspose.words.Document.updatePageLayout(Document.java:1468)
at com.aspose.words.Document.ay(Document.java:1407)
at com.aspose.words.Document.FI(Document.java:1420)
at com.aspose.words.Document.getPageCount(Document.java:1449)
at com.aspose.words.qh.a(FixedPageWriterBase.java:23)
at com.aspose.words.Document.a(Document.java:1360)
at com.aspose.words.Document.save(Document.java:753)
at com.aspose.words.Document.save(Document.java:708)