public final class PdfFileStampWeb extends SaveableFacade implements IPdfFileStamp
Class for adding stamps (watermark or background) to PDF files. Enable to work with HttpServletResponse.
Modifier and Type | Field and Description |
---|---|
static int |
POS_BOTTOM_LEFT
Bottom left position.
|
static int |
POS_BOTTOM_MIDDLE
Bottom middle position.
|
static int |
POS_BOTTOM_RIGHT
Bottom right position.
|
static int |
POS_SIDES_LEFT
Left position.
|
static int |
POS_SIDES_RIGHT
Right position.
|
static int |
POS_UPPER_LEFT
Upper let position.
|
static int |
POS_UPPER_MIDDLE
Upper middle position.
|
static int |
POS_UPPER_RIGHT
Right upper position.
|
Constructor and Description |
---|
PdfFileStampWeb()
Constructor of the PdfFileStamp.
|
PdfFileStampWeb(IDocument document)
Initializes new
PdfFileStamp object on base of the document . |
PdfFileStampWeb(IDocument document,
OutputStream outputStream)
Initializes new
PdfFileStamp object on base of the document . |
PdfFileStampWeb(IDocument document,
String outputFile)
Initializes new
PdfFileStamp object on base of the document . |
PdfFileStampWeb(InputStream inputStream,
javax.servlet.http.HttpServletResponse response)
Creates PdfFileStampWeb which will save result into HttpResponse object.
|
PdfFileStampWeb(InputStream inputStream,
OutputStream outputStream)
Constructor for PdfFileStamp.
|
PdfFileStampWeb(InputStream inputStream,
OutputStream outputStream,
boolean keepSecurity)
Constructor of PdfFileStamp.
|
PdfFileStampWeb(String inputFile,
javax.servlet.http.HttpServletResponse response)
Creates PdfFileStampWeb which will save result into HttpResponse object.
|
PdfFileStampWeb(String inputFile,
String outputFile)
Constructor for PdfFileStamp.
|
PdfFileStampWeb(String inputFile,
String outputFile,
boolean keepSecurity)
Constructor for PdfFileStamp.
|
Modifier and Type | Method and Description |
---|---|
void |
addFooter(FormattedText formattedText,
float bottomMargin)
Adds footer to the pages of the document.
|
void |
addFooter(FormattedText formattedText,
float bottomMargin,
float leftMargin,
float rightMargin)
Adds footer to the pages of the document.
|
void |
addFooter(InputStream imageStream,
float bottomMargin)
Adds image as footer of the page.
|
void |
addFooter(InputStream imageStream,
float bottomMargin,
float leftMargin,
float rightMargin)
Adds image as footer of the page.
|
void |
addFooter(String imageFile,
float bottomMargin)
Adds image as footer to the pages of the document.
|
void |
addFooter(String imageFile,
float bottomMargin,
float leftMargin,
float rightMargin)
Adds image as footer of the pages.
|
void |
addHeader(FormattedText formattedText,
float topMargin)
Adds header to the page.
|
void |
addHeader(FormattedText formattedText,
float topMargin,
float leftMargin,
float rightMargin)
Adds header to the pages of file.
|
void |
addHeader(InputStream imageStream,
float topMargin)
Adds image as header on the pages.
|
void |
addHeader(InputStream inputStream,
float topMargin,
float leftMargin,
float rightMargin)
Adds image at the top of the page.
|
void |
addHeader(String imageFile,
float topMargin)
Adds image as header to the pages of the file.
|
void |
addHeader(String imageFile,
float topMargin,
float leftMargin,
float rightMargin)
Adds image as header on the pages.
|
void |
addPageNumber(FormattedText formattedText)
Adds page number to the page.
|
void |
addPageNumber(FormattedText formattedText,
float x,
float y)
Adds page number at the specified position on the page.
|
void |
addPageNumber(FormattedText formattedText,
int position)
Adds page number to the pages.
|
void |
addPageNumber(FormattedText formattedText,
int position,
float leftMargin,
float rightMargin,
float topMargin,
float bottomMargin)
Adds page number to the pages of document.
|
void |
addPageNumber(String formatString)
Add page number to file.
|
void |
addPageNumber(String formatString,
float x,
float y)
Adds page number at the specified position on the page.
|
void |
addPageNumber(String formatString,
int position)
Adds page number to the pages.
|
void |
addPageNumber(String formatString,
int position,
float leftMargin,
float rightMargin,
float topMargin,
float bottomMargin)
Adds page number to the pages of document.
|
void |
addStamp(Stamp stamp)
Adds stamp to the file.
|
void |
close()
Closes opened files and saves changes.
|
void |
dispose()
Disposes the facade.
|
String |
getAttachmentName()
Gets name of attachment when result of operation is stored into HttpResponse objects as
attachment.
|
int |
getContentDisposition()
Gets how content will be stored when result of operation is stored into HttpResponse object.
|
String |
getInputFile()
Gets name and path of input file.
|
InputStream |
getInputStream()
Gets input stream.
|
boolean |
getKeepSecurity()
Keeps security if true.
|
int |
getNumberingStyle()
Gets or sets pabge numbering style.
|
boolean |
getOptimizeSize()
Gets or sets optimization flag.
|
String |
getOutputFile()
Gets name and path of output file.
|
OutputStream |
getOutputStream()
Gets output stream.
|
float |
getPageHeight()
Gets height of first page in source file.
|
float |
getPageNumberRotation()
Gets rotation of page number.
|
float |
getPageWidth()
Gets width of first page in input file.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Gets Response object where result of operation will be stored.
|
SaveOptions |
getSaveOptions()
Gets save options when result is stored as HttpResponse.
|
int |
getStampId()
Stamp ID of next added stamp (including page headers/hooters/page numbers).
|
int |
getStartingNumber()
Gets or sets starting number for first page in input file.
|
void |
setAttachmentName(String value)
Sets name of attachment when result of operation is stored into HttpResponse objects as
attachment.
|
void |
setContentDisposition(int value)
Sets how content will be stored when result of operation is stored into HttpResponse object.
|
void |
setConvertTo(int value)
Sets PDF file format.
|
void |
setInputFile(String value)
Sets name and path of input file.
|
void |
setInputStream(InputStream value)
Sets input stream.
|
void |
setKeepSecurity(boolean value)
Keeps security if true.
|
void |
setNumberingStyle(int value)
Gets or sets pabge numbering style.
|
void |
setOptimizeSize(boolean value)
Gets or sets optimization flag.
|
void |
setOutputFile(String value)
Sets name and path of output file.
|
void |
setOutputStream(OutputStream value)
Sets or sets output stream.
|
void |
setPageNumberRotation(float value)
Sets rotation of page number.
|
void |
setResponse(javax.servlet.http.HttpServletResponse value)
Sets Response object where result of operation will be stored.
|
void |
setSaveOptions(SaveOptions value)
Sets save options when result is stored as HttpResponse.
|
void |
setStampId(int value)
Stamp ID of next added stamp (including page headers/hooters/page numbers).
|
void |
setStartingNumber(int value)
Sets starting number for first page in input file.
|
save, save
bindPdf, bindPdf, bindPdf, bindPdf, bindPdf, getDocument
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getDocument
public static final int POS_BOTTOM_MIDDLE
Bottom middle position.
public static final int POS_BOTTOM_RIGHT
Bottom right position.
public static final int POS_UPPER_RIGHT
Right upper position.
public static final int POS_SIDES_RIGHT
Right position.
public static final int POS_UPPER_MIDDLE
Upper middle position.
public static final int POS_BOTTOM_LEFT
Bottom left position.
public static final int POS_SIDES_LEFT
Left position.
public static final int POS_UPPER_LEFT
Upper let position.
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");
public PdfFileStampWeb(IDocument document)
Initializes new PdfFileStamp
object on base of the document
.
document
- Pdf document.public PdfFileStampWeb(IDocument document, OutputStream outputStream)
Initializes new PdfFileStamp
object on base of the document
.
document
- Pdf document.outputStream
- Output stream.public PdfFileStampWeb(IDocument document, String outputFile)
Initializes new PdfFileStamp
object on base of the document
.
document
- Pdf document.outputFile
- Output file name and path.public PdfFileStampWeb(InputStream inputStream, OutputStream outputStream)
Constructor for PdfFileStamp.
InputStream input = new FileInputStream("input.pdf"); OutputStream output = new FileInputStream("output.pdf"); PdfFileStamp stamp = new PdfFileStamp(input, output);
inputStream
- Input stream.outputStream
- Output stream.public PdfFileStampWeb(InputStream inputStream, OutputStream outputStream, boolean keepSecurity)
Constructor of PdfFileStamp.
inputStream
- Input stream.outputStream
- Output stream.keepSecurity
- Keep security if true.public PdfFileStampWeb(String inputFile, String outputFile)
Constructor for PdfFileStamp.
PdfFileStamp stamp = new PdfFileStamp("input.pdf", "output.pdf");
inputFile
- Input file name and path.outputFile
- Output file name and path.public PdfFileStampWeb(String inputFile, String outputFile, boolean keepSecurity)
Constructor for PdfFileStamp.
inputFile
- Input file name and path.outputFile
- Output file name and path.keepSecurity
- Keep security if true.public PdfFileStampWeb(InputStream inputStream, javax.servlet.http.HttpServletResponse response)
Creates PdfFileStampWeb which will save result into HttpResponse object.
inputStream
- Stream with input document.response
- HttpResponse object where result will be saved.public PdfFileStampWeb(String inputFile, javax.servlet.http.HttpServletResponse response)
Creates PdfFileStampWeb which will save result into HttpResponse object.
inputFile
- Source file name.response
- HttpResponse object where result will be saved.public boolean getKeepSecurity()
Keeps security if true. (This feature will be implemented in next versions).
getKeepSecurity
in interface IPdfFileStamp
public void setKeepSecurity(boolean value)
Keeps security if true. (This feature will be implemented in next versions).
setKeepSecurity
in interface IPdfFileStamp
value
- boolean valuepublic String getInputFile()
Gets name and path of input file.
getInputFile
in interface IPdfFileStamp
public void setInputFile(String value)
Sets name and path of input file.
setInputFile
in interface IPdfFileStamp
value
- String objectpublic InputStream getInputStream()
Gets input stream.
getInputStream
in interface IPdfFileStamp
public void setInputStream(InputStream value)
Sets input stream.
setInputStream
in interface IPdfFileStamp
value
- InputStream objectpublic String getOutputFile()
Gets name and path of output file.
getOutputFile
in interface IPdfFileStamp
public void setOutputFile(String value)
Sets name and path of output file.
setOutputFile
in interface IPdfFileStamp
value
- String objectpublic OutputStream getOutputStream()
Gets output stream.
getOutputStream
in interface IPdfFileStamp
public void setOutputStream(OutputStream value)
Sets or sets output stream.
setOutputStream
in interface IPdfFileStamp
value
- OutputStream objectpublic float getPageNumberRotation()
Gets rotation of page number. Rotation is in degrees. Default is 0.
getPageNumberRotation
in interface IPdfFileStamp
public void setPageNumberRotation(float value)
Sets rotation of page number. Rotation is in degrees. Default is 0.
setPageNumberRotation
in interface IPdfFileStamp
value
- float valuepublic void setConvertTo(int value)
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.
setConvertTo
in interface IPdfFileStamp
value
- PdfFormat elementPdfFormat
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();
getPageHeight
in interface IPdfFileStamp
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();
getPageWidth
in interface IPdfFileStamp
public int getStartingNumber()
getStartingNumber
in interface IPdfFileStamp
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();
setStartingNumber
in interface IPdfFileStamp
value
- int valuepublic void addStamp(Stamp stamp)
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();
addStamp
in interface IPdfFileStamp
stamp
- Stamp object.public void addPageNumber(String formatString)
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
in interface IPdfFileStamp
formatString
- Text of page numberpublic void addPageNumber(FormattedText formattedText)
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
in interface IPdfFileStamp
formattedText
- Format string for page number representes as FormattedText.public void addPageNumber(String formatString, int position, float leftMargin, float rightMargin, float topMargin, float bottomMargin)
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();
addPageNumber
in interface IPdfFileStamp
formatString
- Format string for page number.position
- Position where page number will be placed on the page. 0-bottom middle, 1-bottom right,
2-upper right, 3 - sides right, 4 - upper middle,5 - bottom left,6 - sides left,7 - upper
left. You can use the following constants: PosBottomMiddle = 0, PosBottomRight = 1,
PosUpperRight = 2, PosSidesRight = 3, PosUpperMiddle, PosBottomLeft = 5, PosSidesLeft,
PosUpperLeftleftMargin
- Margin on the left edge of the page.rightMargin
- Margin on the right edge of the page.topMargin
- Margin on the top edge of the page.bottomMargin
- Margin on the bottom edge of the page.public void addPageNumber(String formatString, float x, float y)
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
in interface IPdfFileStamp
formatString
- Format string. Format string can contain # sign which will be replaced with page number.x
- X coordinate of page number.y
- Y coordinate of page number.public void addPageNumber(FormattedText formattedText, int position, float leftMargin, float rightMargin, float topMargin, float bottomMargin)
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
in interface IPdfFileStamp
formattedText
- FormattedText object which represents page number format and properties iof the text.position
- Position where page number will be placed on the page. 0-bottom middle, 1-bottom right,
2-upper right, 3 - sides right, 4 - upper middle,5 - bottom left,6 - sides left,7 - upper
left. You can use the following constants: PosBottomMiddle = 0, PosBottomRight = 1,
PosUpperRight = 2, PosSidesRight = 3, PosUpperMiddle, PosBottomLeft = 5, PosSidesLeft,
PosUpperLeftleftMargin
- Margin on the left edge of the page.rightMargin
- Margin on the right edge of the page.topMargin
- Margin on the top edge of the page.bottomMargin
- Margin on the bottom edge of the page.public void addPageNumber(FormattedText formattedText, float x, float y)
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
in interface IPdfFileStamp
formattedText
- Formatted text which represents page number format and properties of the text. Format string
can contain # sign which will be replaced with page number.x
- X coordinate of page number.y
- Y coordinate of page number.public void addHeader(FormattedText formattedText, float topMargin)
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
in interface IPdfFileStamp
formattedText
- Text for header and properties of the text.topMargin
- Margin on the top of page.public void addHeader(FormattedText formattedText, float topMargin, float leftMargin, float rightMargin)
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
in interface IPdfFileStamp
formattedText
- Formatted text object which contains page text and its properties.topMargin
- Margin on the top of the page.leftMargin
- Margin on the left of the page.rightMargin
- Margin on the right of the page.public void addHeader(String imageFile, float topMargin)
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
in interface IPdfFileStamp
imageFile
- Path to the image file.topMargin
- Margin at top of the page.public void addHeader(String imageFile, float topMargin, float leftMargin, float rightMargin)
Adds image as header on the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", output.pdf"); fileStamp.addHeader("image.jpg", 50, 100, 100); fileStamp.close();
addHeader
in interface IPdfFileStamp
imageFile
- Path to the image file.topMargin
- Margin at top of the page.leftMargin
- Margin at left side of the page.rightMargin
- Margin at right side of the page.public void addHeader(InputStream imageStream, float topMargin)
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
in interface IPdfFileStamp
imageStream
- Stream of the image.topMargin
- Margin at top of the page.public void addHeader(InputStream inputStream, float topMargin, float leftMargin, float rightMargin)
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
in interface IPdfFileStamp
inputStream
- Stream which contains image data.topMargin
- Margin at top of the page.leftMargin
- Margin at left side of the page.rightMargin
- Margin at right side of the page.public void addFooter(FormattedText formattedText, float bottomMargin)
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
in interface IPdfFileStamp
formattedText
- FormattedText object which contains text of the footer and text properties.bottomMargin
- Margin at the top of page.public void addFooter(FormattedText formattedText, float bottomMargin, float leftMargin, float rightMargin)
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
in interface IPdfFileStamp
formattedText
- FormattedText object which contains footer text and text properties.bottomMargin
- Margin at the bottom of the page.leftMargin
- Margin at the left side of the page.rightMargin
- Margin at the right side of the page.public void addFooter(String imageFile, float bottomMargin)
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
in interface IPdfFileStamp
imageFile
- Image file name and path.bottomMargin
- Margin at the bottom of the page.public void addFooter(String imageFile, float bottomMargin, float leftMargin, float rightMargin)
Adds image as footer of the pages.
addFooter
in interface IPdfFileStamp
imageFile
- Iamge file name and path.bottomMargin
- Margin at the bottom of the page.leftMargin
- Margin at the left side of the page.rightMargin
- Margin at the right side of the page.public void addFooter(InputStream imageStream, float bottomMargin)
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
in interface IPdfFileStamp
imageStream
- Stream contains image data.bottomMargin
- Margin at the bottom of the page.public void addFooter(InputStream imageStream, float bottomMargin, float leftMargin, float rightMargin)
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
in interface IPdfFileStamp
imageStream
- Stream contains image data.bottomMargin
- Margin at the bottom of the page.leftMargin
- Margin at the left side of the page.rightMargin
- Margin at the right side of the page.public void addPageNumber(String formatString, int position)
Adds page number to the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #", PdfFileStamp.PosUpperRight); fileStamp.close();
addPageNumber
in interface IPdfFileStamp
formatString
- Format of the page number. This text may contain # which will be replaced with page number.position
- Position where page number will be placed on the page. 0-bottom middle, 1-bottom right,
2-upper right, 3 - sides right, 4 - upper middle,5 - bottom left,6 - sides left,7 - upper
left. You can use the following constants: PosBottomMiddle = 0, PosBottomRight = 1,
PosUpperRight = 2, PosSidesRight = 3, PosUpperMiddle, PosBottomLeft = 5, PosSidesLeft,
PosUpperLeftpublic void addPageNumber(FormattedText formattedText, int position)
Adds page number to the pages.
PdfFileStamp fileStamp = new PdfFileStamp("input.pdf", "output.pdf"); fileStamp.addPageNumber("Page #", PdfFileStamp.PosUpperRight); fileStamp.close();
addPageNumber
in interface IPdfFileStamp
formattedText
- FormattedText object which contains format of the page number and text properties. This text
may contain # which will be replaced with page number.position
- Position where page number will be placed on the page. 0-bottom middle, 1-bottom right,
2-upper right, 3 - sides right, 4 - upper middle,5 - bottom left,6 - sides left,7 - upper
left. You can use the following constants: PosBottomMiddle = 0, PosBottomRight = 1,
PosUpperRight = 2, PosSidesRight = 3, PosUpperMiddle, PosBottomLeft = 5, PosSidesLeft,
PosUpperLeftpublic int getContentDisposition()
Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
getContentDisposition
in interface IPdfFileStamp
ContentDisposition
public void setContentDisposition(int value)
Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
setContentDisposition
in interface IPdfFileStamp
value
- ContentDisposition elementContentDisposition
public SaveOptions getSaveOptions()
Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
getSaveOptions
in interface IPdfFileStamp
public void setSaveOptions(SaveOptions value)
Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
setSaveOptions
in interface IPdfFileStamp
value
- SaveOptions objectpublic String getAttachmentName()
Gets name of attachment when result of operation is stored into HttpResponse objects as attachment.
getAttachmentName
in interface IPdfFileStamp
public void setAttachmentName(String value)
Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
setAttachmentName
in interface IPdfFileStamp
value
- string objectpublic 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();
close
in interface IFacade
close
in interface IPdfFileStamp
public javax.servlet.http.HttpServletResponse getResponse()
Gets Response object where result of operation will be stored.
public void setResponse(javax.servlet.http.HttpServletResponse value)
Sets Response object where result of operation will be stored.
value
- HttpServletResponse objectpublic boolean getOptimizeSize()
Gets or sets optimization flag. Equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.
public void setOptimizeSize(boolean value)
Gets or sets optimization flag. Equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.
value
- boolean valuepublic void dispose()
Facade
Disposes the facade.
dispose
in interface com.aspose.ms.System.IDisposable
dispose
in interface IPdfFileStamp
dispose
in class Facade
public int getNumberingStyle()
Gets or sets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase
NumberingStyle
public void setNumberingStyle(int value)
Gets or sets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase
value
- NumberingStyle elementNumberingStyle
public int getStampId()
Stamp ID of next added stamp (including page headers/hooters/page numbers).
public void setStampId(int value)
Stamp ID of next added stamp (including page headers/hooters/page numbers).
value
- int value