Control the Appearance of Empty Signature Fields and Better Text Extraction with Aspose.Pdf.Kit for Java 4.5.0

Aspose.Pdf icon

We are pleased to announce the release of Aspose.Pdf.Kit for Java 4.5.0. In this release version, we have greatly improved the text extraction feature and we have also introduced a method to control the appearance of empty signature fields. In order to fulfill this requirement, new methods are implemented in the FormEditor class. Now you can make form fields hidden by specifying the Form.FLAG_HIDDEN flag as a parameter of the addField(…) method.

FormEditor editor = new FormEditor(INPUT_FILE, tmp_filename);  
editor.addField(FieldType.Signature, "Kunde", 1, 100, 100, 201, 201, Form.FLAG_HIDDEN);  
editor.addField(FieldType.Signature, "gesetzl Vertreter", 100, 100, 201, 201, Form.FLAG_HIDDEN);  
editor.addField(FieldType.Signature, "Berater", 2, new Rectangle(300, 100, 500 - 300, 250 - 100), 
       Form.FLAG_HIDDEN); 
editor.save();

You may also use the setFieldFlag method for the same reason. It is fixed for editing new fields before save, but this is not recommended due to perfomance reason.

FormEditor editor = new FormEditor(INPUT_FILE, tmp_filename);  
editor.setFieldFlag("Berater", Form.FLAG_HIDDEN); 
editor.save();

Please visit the following link for further details on what’s new & fixed in Aspose.Pdf.Kit for Java 4.5.0.