Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.2
-
Fix Version/s: 6.1.3
-
Component/s: Core/Rendering
-
Labels:None
-
Environment:All
-
Support Case References:Support Case #13903 - https://icesoft.my.salesforce.com/5007000001eranl
Description
The following error stack trace is thrown when rendering the provided PDF file:
WARNING: Error generating widget field
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.icepdf.ri.common.views.annotations.AnnotationComponentFactory.generatedWidgetField(AnnotationComponentFactory.java:180)
at org.icepdf.ri.common.views.annotations.AnnotationComponentFactory.buildAnnotationComponent(AnnotationComponentFactory.java:124)
at org.icepdf.ri.common.views.AbstractPageViewComponent.refreshAnnotationComponents(AbstractPageViewComponent.java:202)
at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:1101)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.icepdf.core.pobjects.annotations.TextWidgetAnnotation.buildTextWidgetContents(TextWidgetAnnotation.java:158)
at org.icepdf.core.pobjects.annotations.TextWidgetAnnotation.resetAppearanceStream(TextWidgetAnnotation.java:70)
at org.icepdf.core.pobjects.annotations.Annotation.resetAppearanceStream(Annotation.java:1826)
at org.icepdf.core.pro.acroform.TextFieldComponent.resetAppearanceShapes(Unknown Source)
at org.icepdf.core.pro.acroform.TextFieldComponent.<init>(Unknown Source)
... 11 more
WARNING: Error generating widget field
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.icepdf.ri.common.views.annotations.AnnotationComponentFactory.generatedWidgetField(AnnotationComponentFactory.java:180)
at org.icepdf.ri.common.views.annotations.AnnotationComponentFactory.buildAnnotationComponent(AnnotationComponentFactory.java:124)
at org.icepdf.ri.common.views.AbstractPageViewComponent.refreshAnnotationComponents(AbstractPageViewComponent.java:202)
at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:1101)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.icepdf.core.pobjects.annotations.TextWidgetAnnotation.buildTextWidgetContents(TextWidgetAnnotation.java:158)
at org.icepdf.core.pobjects.annotations.TextWidgetAnnotation.resetAppearanceStream(TextWidgetAnnotation.java:70)
at org.icepdf.core.pobjects.annotations.Annotation.resetAppearanceStream(Annotation.java:1826)
at org.icepdf.core.pro.acroform.TextFieldComponent.resetAppearanceShapes(Unknown Source)
at org.icepdf.core.pro.acroform.TextFieldComponent.<init>(Unknown Source)
... 11 more
The initial issue is related to the the lack of a bbox value for the content stream. There is a rectangle value that can be used as an alternative. Further testing has shown that there is also an issue with the setting of the special values when writing out the content stream.