#Itextsharp pdfstamper pdfwriter add element pdf
The URL created is correct, a PDF is created so I suspect it might not be getting the file or closing off correctly as I can not delete the files either without restarting IIS. I would appreciate a second pair of eyes to see if there is something 'obvious'!
#Itextsharp pdfstamper pdfwriter add element code
I can not see anything wrong with the code though! IOException Closes the document.The below code was working and create a corruption PDF that is 1kb, usually it would be around 250kb. The appearances and other parameters can the be set. Public PdfSignatureAppearance getSignatureAppearance() Gets the signing instance. Parameters: pageNumber - the page number position where the new page will be inserted mediabox - the size of the new page If pageNumber is bigger than the total number of pages All the pages above and including pageNumber willīe shifted up. Rectangle mediabox) Inserts a blank page. Parameters: r - the PdfReader from where the new page will be imported pageImported - the page number of the imported page pageReplaced - the page to replace in this document Since: iText 2.1.1 GetOverContent() or getUndercontent() are called for the same page. Is replaced not the fields and annotations. Int pageReplaced) Replaces a page from this document with a page from other document. Parameters: moreInfo - additional entries to the info dictionary Values delete the key in the original info dictionary Public void setMoreInfo( HashMap moreInfo) An optional String map to add or change values in Public HashMap getMoreInfo() Gets the optional String map to add or change values in Only useful for multiple signatures as nothing is gained in speed or memory
It cannot be reused os - the output stream pdfVersion - the new pdf version or '\0' to keep the same version as the originalĭocument append - if true appends the document changes as a new revision. Parameters: reader - the original document. It cannot be reused os - the output stream IOException Starts the process of adding extra content to an existing PDF Private PdfSignatureAppearance sigApp Constructor Detail Protected PdfStamperImp stamper The writer ObjectĬlone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait SetRotateContents(boolean rotateContents)įlags the content to be automatically adjusted to compensate Sets the open and close page additional action.
Sets the document's compression to the new 1.5 mode with object streams and xrefĪn optional String map to add or change values in Sets the certificate encryption options for this document.ĭetermines if the fields are flattened on close.ĭetermines if the FreeText annotations are flattened on close. Sets the encryption options for this document. Sets the display duration for the page (for presentations) Replaces a page from this document with a page from other document. This is the most simple way to change a PDF into aĪdds name to the list of fields that will be flattened on close, Gets a PdfContentByte to write under the page ofĬhecks if the content is automatically adjusted to compensateĪdds or replaces the Collection Dictionary in the Catalog. With the names/titles of the layers as keys. Gets the PdfLayer objects in an existing document as a Map Gets a PdfContentByte to write over the page of Gets the optional String map to add or change values in Gets the AcroFields object that allows to get and set field values Starts the process of adding extra content to an existing PDFĪdds an annotation of form field in a specific page.Īdds the comments present in an FDF file.Īdds a file attachment at the document level.Īdds a JavaScript action at the document level.Īpplies a digital signature to a document.Īpplies a digital signature to a document, possibly as a new revision, making New fields can be added but not flattened. It is also possible to change the field values and toįlatten them. The original PDF will keepĪll the interactive elements including bookmarks, links and form fields. This extra content can be all the objects allowed in PdfContentByte Public class PdfStamper extends Object implements PdfViewerPreferences, PdfEncryptionSettingsĪpplies extra content to the pages of a PDF document. SUMMARY: NESTED | FIELD | CONSTR | METHODĬlass PdfStamper .PdfStamper All Implemented Interfaces: PdfEncryptionSettings, PdfViewerPreferences