PdfFileStampWeb
Inheritance: java.lang.Object, com.aspose.pdf.facades.Facade com.aspose.pdf.facades.SaveableFacade com.aspose.pdf.facades.PdfFileStampWeb, com.aspose.pdf.facades.Facade, com.aspose.pdf.facades.SaveableFacade com.aspose.pdf.facades.PdfFileStampWeb, com.aspose.pdf.facades.SaveableFacade, com.aspose.pdf.facades.PdfFileStampWeb
All Implemented Interfaces: com.aspose.ms.System.IDisposable, IFacade, IPdfFileStamp, ISaveableFacade, Closeable, AutoCloseable
public final class PdfFileStampWeb extends SaveableFacade implements IPdfFileStamp
Class for adding stamps (watermark or background) to PDF files. Enable to work with HttpServletResponse.
Fields
| Field | Description |
|---|---|
| POS_BOTTOM_LEFT | Bottom left position. |
| POS_BOTTOM_MIDDLE | Bottom middle position. |
| POS_BOTTOM_RIGHT | Bottom right position. |
| POS_SIDES_LEFT | Left position. |
| POS_SIDES_RIGHT | Right position. |
| POS_UPPER_LEFT | Upper let position. |
| POS_UPPER_MIDDLE | Upper middle position. |
| POS_UPPER_RIGHT | Right upper position. |
Constructors
| Constructor | Description |
|---|---|
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
| PdfFileStampWeb | Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties. PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( “input.pdf”); fileStamp.setOutputFile ( “output.pdf”); |
Methods
| Method | Description |
|---|---|
| addFooter | Adds footer to the pages of the document. PdfFileStamp stamp = new PdfFileStamp(“input.pdf”, “output.pdf”); stamp.addFooter(new FormattedText(“Foot of the page”), 10); |
| addFooter | Adds footer to the pages of the document. PdfFileStamp stamp = new PdfFileStamp(“input.pdf”, “output.pdf”); stamp.addFooter(new FormattedText(“Foot of the page”), 10, 50, 50); |
| addFooter | Adds image as footer of the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); InputStream input = new FileInputStream(“test.jpg”); fileStamp.addFooter(input, 50); fileStamp.close(); |
| addFooter | Adds image as footer of the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); InputStream input = new FileInputStream(“test.jpg”); fileStamp.addFooter(input, 50, 50, 50); fileStamp.close(); |
| addFooter | Adds image as footer to the pages of the document. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); fileStamp.addFooter(“image.jpg”, 50); fileStamp.close(); |
| addFooter | Adds image as footer of the pages. |
| addHeader | Adds header to the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addHeader(new FormattedText(“Head of the page”), 50); fileStamp.close(); |
| addHeader | Adds header to the pages of file. PdfFileStamp stamp = new PdfFileStamp(“input.pdf”, “output.pdf”); stamp.addHeader(new FormattedText(“Head of the page”), 10, 50, 50); |
| addHeader | Adds image as header on the pages. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); InputStream input = new FileInputStream(“test.jpg”); fileStamp.addHeader(input, 50); fileStamp.close(); |
| addHeader | Adds image at the top of the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); InputStream input = new FileInputStream(“test.jpg”); fileStamp.addHeader(input, 50, 100, 100); fileStamp.close(); |
| addHeader | Adds image as header to the pages of the file. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); fileStamp.addHeader(“image.jpg”, 50); fileStamp.close(); |
| addHeader | Adds image as header on the pages. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, output.pdf"); fileStamp.addHeader(“image.jpg”, 50, 100, 100); fileStamp.close(); |
| addPageNumber | Adds page number to the page. Page number may contain # sign which will be replaced with page number. Page number is placed in the bottom of the page centered horizontally. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(new FormattedText(“Page #”)); fileStamp.close(); |
| addPageNumber | Adds page number at the specified position on the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(new FormattedText(“Page #”), 123, 357); fileStamp.close(); |
| addPageNumber | Adds page number to the pages. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(“Page #”, PdfFileStamp.PosUpperRight); fileStamp.close(); |
| addPageNumber | Adds page number to the pages of document. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(new FormattedText(“Page #”), PdfFileStamp.POS_BOTTOM_LEFT, 100, 100, 200, 200); fileStamp.close(); |
| addPageNumber | Add page number to file. Page number text may contain # sign which will be replaced with number of the page. Page number is placed in the bottom of the page centered horizontally. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(“Page #”); fileStamp.close(); |
| addPageNumber | Adds page number at the specified position on the page. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(new FormattedText(“Page #”), 123, 357); fileStamp.close(); |
| addPageNumber | Adds page number to the pages. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(“Page #”, PdfFileStamp.PosUpperRight); fileStamp.close(); |
| addPageNumber | Adds page number to the pages of document. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.addPageNumber(“Page #”, PdfFileStamp.POS_BOTTOM_LEFT, 100, 100, 200, 200); fileStamp.close(); |
| addStamp | Adds stamp to the file. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); Stamp stamp = new com.aspose.pdf.facades.Stamp(); stamp.setOrigin(140, 400); stamp.setImageSize(50, 50); stamp.setOpacity ( 0.8f); stamp.isBackground ( true); stamp.bindImage(“image.jpg”); fileStamp.addStamp(stamp); fileStamp.close(); |
| close | Closes opened files and saves changes. Warning. If input or output streams are specified they are not closed by Close() method. PdfFileStamp stamp = new PdfFileStamp(“input.pdf”, “output.pdf”); //do some work… stamp.close(); |
| dispose | Deprecated. |
| getAttachmentName | Gets name of attachment when result of operation is stored into HttpResponse objects as attachment. |
| getContentDisposition | Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. |
| getInputFile | Gets name and path of input file. |
| getInputStream | Gets input stream. |
| getKeepSecurity | Keeps security if true. (This feature will be implemented in next versions). |
| getNumberingStyle | Gets or sets pabge numbering style. |
| getOptimizeSize | Gets or sets optimization flag. |
| getOutputFile | Gets name and path of output file. |
| getOutputStream | Gets output stream. |
| getPageHeight | Gets height of first page in source file. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); System.out.println(“Height = " + fileStamp.getPageHeight()); fileStamp.close(); |
| getPageNumberRotation | Gets rotation of page number. Rotation is in degrees. Default is 0. |
| getPageWidth | Gets width of first page in input file. PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); System.out.println(“Width = " + fileStamp.getPageWidth()); fileStamp.close(); |
| getResponse | Gets Response object where result of operation will be stored. |
| getSaveOptions | Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. |
| getStampId | Stamp ID of next added stamp (including page headers/hooters/page numbers). |
| getStartingNumber | Gets or sets starting number for first page in input file. Next pages will be numbered starting from this value. |
| setAttachmentName | Sets name of attachment when result of operation is stored into HttpResponse objects as attachment. |
| setContentDisposition | Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. |
| setConvertTo | Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion. |
| setInputFile | Sets name and path of input file. |
| setInputStream | Sets input stream. |
| setKeepSecurity | Keeps security if true. (This feature will be implemented in next versions). |
| setNumberingStyle | Gets or sets pabge numbering style. |
| setOptimizeSize | Gets or sets optimization flag. |
| setOutputFile | Sets name and path of output file. |
| setOutputStream | Sets or sets output stream. |
| setPageNumberRotation | Sets rotation of page number. Rotation is in degrees. Default is 0. |
| setResponse | Sets Response object where result of operation will be stored. |
| setSaveOptions | Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. |
| setStampId | Stamp ID of next added stamp (including page headers/hooters/page numbers). |
| setStartingNumber | Sets starting number for first page in input file. Next pages will be numbered starting from this value. For example if StartingNumber is set to 100, document pages will have numbers 100, 101, 102… PdfFileStamp fileStamp = new PdfFileStamp(“input.pdf”, “output.pdf”); fileStamp.setStartingNumber( 100); fileStamp.addPageNumber(“Page #”); fileStamp.close(); |
POS_BOTTOM_LEFT
public static final int POS_BOTTOM_LEFT
Bottom left position.
POS_BOTTOM_MIDDLE
public static final int POS_BOTTOM_MIDDLE
Bottom middle position.
POS_BOTTOM_RIGHT
public static final int POS_BOTTOM_RIGHT
Bottom right position.
POS_SIDES_LEFT
public static final int POS_SIDES_LEFT
Left position.
POS_SIDES_RIGHT
public static final int POS_SIDES_RIGHT
Right position.
POS_UPPER_LEFT
public static final int POS_UPPER_LEFT
Upper let position.
POS_UPPER_MIDDLE
public static final int POS_UPPER_MIDDLE
Upper middle position.
POS_UPPER_RIGHT
public static final int POS_UPPER_RIGHT
Right upper position.
PdfFileStampWeb
public PdfFileStampWeb()
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
PdfFileStampWeb
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp fileStamp = new PdfFileStamp(); fileStamp.setInputFile ( "input.pdf"); fileStamp.setOutputFile ( "output.pdf");
addFooter
Adds footer to the pages of the document.
PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf"); stamp.addFooter(new FormattedText("Foot of the page"), 10); addFooter
Adds footer to the pages of the document.
PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf"); stamp.addFooter(new FormattedText("Foot of the page"), 10, 50, 50); addFooter
Adds image as footer of the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); InputStream input = new FileInputStream("test.jpg"); fileStamp.addFooter(input, 50); fileStamp.close(); addFooter
Adds image as footer of the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); InputStream input = new FileInputStream("test.jpg"); fileStamp.addFooter(input, 50, 50, 50); fileStamp.close(); addFooter
Adds image as footer to the pages of the document.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); fileStamp.addFooter("image.jpg", 50); fileStamp.close(); addFooter
Adds image as footer of the pages.
addHeader
Adds header to the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addHeader(new FormattedText("Head of the page"), 50); fileStamp.close(); addHeader
Adds header to the pages of file.
PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf"); stamp.addHeader(new FormattedText("Head of the page"), 10, 50, 50); addHeader
Adds image as header on the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); InputStream input = new FileInputStream("test.jpg"); fileStamp.addHeader(input, 50); fileStamp.close(); addHeader
Adds image at the top of the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); InputStream input = new FileInputStream("test.jpg"); fileStamp.addHeader(input, 50, 100, 100); fileStamp.close(); addHeader
Adds image as header to the pages of the file.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); fileStamp.addHeader("image.jpg", 50); fileStamp.close(); addHeader
Adds image as header on the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); fileStamp.addHeader("image.jpg", 50, 100, 100); fileStamp.close(); addPageNumber
Adds page number to the page. Page number may contain # sign which will be replaced with page number. Page number is placed in the bottom of the page centered horizontally.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber(new FormattedText("Page #")); fileStamp.close(); addPageNumber
Adds page number at the specified position on the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber(new FormattedText("Page #"), 123, 357); fileStamp.close(); addPageNumber
Adds page number to the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #", PdfFileStamp.PosUpperRight); fileStamp.close(); addPageNumber
Adds page number to the pages of document.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber(new FormattedText("Page #"), PdfFileStamp.POS_BOTTOM_LEFT, 100, 100, 200, 200); fileStamp.close(); addPageNumber
Add page number to file. Page number text may contain # sign which will be replaced with number of the page. Page number is placed in the bottom of the page centered horizontally.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #"); fileStamp.close(); addPageNumber
Adds page number at the specified position on the page.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber(new FormattedText("Page #"), 123, 357); fileStamp.close(); addPageNumber
Adds page number to the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #", PdfFileStamp.PosUpperRight); fileStamp.close(); addPageNumber
Adds page number to the pages of document.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #", PdfFileStamp.POS_BOTTOM_LEFT, 100, 100, 200, 200); fileStamp.close(); addStamp
Adds stamp to the file.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); Stamp stamp = new com.aspose.pdf.facades.Stamp(); stamp.setOrigin(140, 400); stamp.setImageSize(50, 50); stamp.setOpacity ( 0.8f); stamp.isBackground ( true); stamp.bindImage("image.jpg"); fileStamp.addStamp(stamp); fileStamp.close(); close
public void close()
Closes opened files and saves changes. Warning. If input or output streams are specified they are not closed by Close() method.
PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf"); //do some work... stamp.close(); dispose
@Deprecated public void dispose()
Deprecated.
getAttachmentName
public String getAttachmentName()
Gets name of attachment when result of operation is stored into HttpResponse objects as attachment.
Returns: string object
getContentDisposition
public ContentDisposition getContentDisposition()
Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
Returns: ContentDisposition element
getInputFile
public String getInputFile()
Gets name and path of input file.
Returns: String object
getInputStream
public InputStream getInputStream()
Gets input stream.
Returns: InputStream object
getKeepSecurity
public boolean getKeepSecurity()
Keeps security if true. (This feature will be implemented in next versions).
Returns: boolean value
getNumberingStyle
public NumberingStyle getNumberingStyle()
Gets or sets pabge numbering style.
Returns: NumberingStyle element
getOptimizeSize
public boolean getOptimizeSize()
Gets or sets optimization flag.
Returns: boolean value
getOutputFile
public String getOutputFile()
Gets name and path of output file.
Returns: String object
getOutputStream
public OutputStream getOutputStream()
Gets output stream.
Returns: OutputStream object
getPageHeight
public float getPageHeight()
Gets height of first page in source file.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); System.out.println("Height = " + fileStamp.getPageHeight()); fileStamp.close(); Returns: float value
getPageNumberRotation
public float getPageNumberRotation()
Gets rotation of page number. Rotation is in degrees. Default is 0.
Returns: float value
getPageWidth
public float getPageWidth()
Gets width of first page in input file.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); System.out.println("Width = " + fileStamp.getPageWidth()); fileStamp.close(); Returns: float value
getResponse
public javax.servlet.http.HttpServletResponse getResponse()
Gets Response object where result of operation will be stored.
Returns: HttpServletResponse object
getSaveOptions
public SaveOptions getSaveOptions()
Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
Returns: SaveOptions object
getStampId
public int getStampId()
Stamp ID of next added stamp (including page headers/hooters/page numbers).
Returns: int value
getStartingNumber
public int getStartingNumber()
Gets or sets starting number for first page in input file. Next pages will be numbered starting from this value.
Returns: int value
setAttachmentName
Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
setContentDisposition
Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
setConvertTo
Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion.
setInputFile
Sets name and path of input file.
setInputStream
Sets input stream.
setKeepSecurity
public void setKeepSecurity(boolean value)
Keeps security if true. (This feature will be implemented in next versions).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setNumberingStyle
Gets or sets pabge numbering style.
setOptimizeSize
public void setOptimizeSize(boolean value)
Gets or sets optimization flag.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setOutputFile
Sets name and path of output file.
setOutputStream
Sets or sets output stream.
setPageNumberRotation
public void setPageNumberRotation(float value)
Sets rotation of page number. Rotation is in degrees. Default is 0.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | float value |
setResponse
Sets Response object where result of operation will be stored.
setSaveOptions
Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
setStampId
public void setStampId(int value)
Stamp ID of next added stamp (including page headers/hooters/page numbers).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value |
setStartingNumber
public void setStartingNumber(int value)
Sets starting number for first page in input file. Next pages will be numbered starting from this value. For example if StartingNumber is set to 100, document pages will have numbers 100, 101, 102...
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.setStartingNumber( 100); fileStamp.addPageNumber("Page #"); fileStamp.close(); Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int value |