List of usage examples for org.apache.pdfbox.pdmodel.interactive.annotation PDAppearanceDictionary setNormalAppearance
public void setNormalAppearance(PDAppearanceStream ap)
From source file:at.gv.egiz.pdfas.lib.impl.stamping.pdfbox.PDFAsVisualSignatureBuilder.java
License:EUPL
public void createAppearanceDictionary(PDXObjectForm holderForml, PDSignatureField signatureField, float degrees) throws IOException { PDAppearanceDictionary appearance = new PDAppearanceDictionary(); appearance.getCOSObject().setDirect(true); PDAppearanceStream appearanceStream = new PDAppearanceStream(holderForml.getCOSStream()); AffineTransform transform = new AffineTransform(); transform.setToIdentity();/*from w w w .jav a 2 s. c om*/ transform.rotate(Math.toRadians(degrees)); appearanceStream.setMatrix(transform); appearance.setNormalAppearance(appearanceStream); signatureField.getWidget().setAppearance(appearance); getStructure().setAppearanceDictionary(appearance); logger.debug("PDF appearance Dictionary has been created"); }
From source file:at.gv.egiz.pdfas.lib.impl.stamping.pdfbox2.PDFAsVisualSignatureBuilder.java
License:EUPL
public void createAppearanceDictionary(PDFormXObject holderForml, PDSignatureField signatureField, float degrees) throws IOException { PDAppearanceDictionary appearance = new PDAppearanceDictionary(); appearance.getCOSObject().setDirect(true); PDAppearanceStream appearanceStream = new PDAppearanceStream(holderForml.getCOSStream()); AffineTransform transform = new AffineTransform(); transform.setToIdentity();//from w w w .ja va2s .c om transform.rotate(Math.toRadians(degrees)); appearanceStream.setMatrix(transform); appearance.setNormalAppearance(appearanceStream); signatureField.getWidget().setAppearance(appearance); getStructure().setAppearanceDictionary(appearance); logger.debug("PDF appereance Dictionary has been created"); }