File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2424import org .apache .logging .log4j .LogManager ;
2525import org .apache .pdfbox .cos .COSDictionary ;
2626import org .apache .pdfbox .cos .COSName ;
27+ import org .apache .pdfbox .pdmodel .common .PDRectangle ;
2728import org .apache .pdfbox .pdmodel .interactive .annotation .PDAnnotationWidget ;
2829import org .apache .pdfbox .pdmodel .interactive .digitalsignature .PDSeedValue ;
2930import org .apache .pdfbox .pdmodel .interactive .digitalsignature .PDSignature ;
@@ -196,10 +197,11 @@ void constructAppearances() throws IOException
196197 PDAnnotationWidget widget = this .getWidgets ().get (0 );
197198 if (widget != null )
198199 {
200+ PDRectangle rectangle = widget .getRectangle ();
199201 // check if the signature is visible
200- if (widget . getRectangle () == null ||
201- Float .compare (widget . getRectangle (). getHeight (), 0 ) == 0 && Float .compare (widget . getRectangle () .getWidth (), 0 ) == 0 ||
202- widget .isNoView () || widget .isHidden ())
202+ if (rectangle == null ||
203+ Float .compare (rectangle . getHeight (), 0 ) == 0 && Float .compare (rectangle .getWidth (), 0 ) == 0 ||
204+ widget .isNoView () || widget .isHidden ())
203205 {
204206 return ;
205207 }
You can’t perform that action at this time.
0 commit comments