|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.DocWriter
com.lowagie.text.pdf.PdfWriter
A DocWriter
class for PDF.
When this PdfWriter
is added
to a certain PdfDocument
, the PDF representation of every Element
added to this Document will be written to the outputstream.
Nested Class Summary | |
static class |
PdfWriter.PdfBody
This class generates the structure of a PDF document. |
(package private) static class |
PdfWriter.PdfTrailer
PdfTrailer is the PDF Trailer object.
|
Field Summary | |
static int |
AllowAssembly
The operation permitted when the document is opened with the user password |
static int |
AllowCopy
The operation permitted when the document is opened with the user password |
static int |
AllowDegradedPrinting
The operation permitted when the document is opened with the user password |
static int |
AllowFillIn
The operation permitted when the document is opened with the user password |
static int |
AllowModifyAnnotations
The operation permitted when the document is opened with the user password |
static int |
AllowModifyContents
The operation permitted when the document is opened with the user password |
static int |
AllowPrinting
The operation permitted when the document is opened with the user password |
static int |
AllowScreenReaders
The operation permitted when the document is opened with the user password |
protected PdfWriter.PdfBody |
body
body of the PDF document |
static int |
CenterWindow
A viewer preference |
protected int |
colorNumber
The color number counter for the colors in the document. |
protected PdfEncryption |
crypto
|
protected int |
currentPageNumber
|
protected PdfReaderInstance |
currentPdfReaderInstance
|
static PdfName |
DID_PRINT
|
static PdfName |
DID_SAVE
|
protected PdfContentByte |
directContent
The direct content in this document. |
protected PdfContentByte |
directContentUnder
The direct content under in this document. |
static int |
DirectionL2R
A viewer preference |
static int |
DirectionR2L
A viewer preference |
static PdfName |
DOCUMENT_CLOSE
|
protected HashMap |
documentColors
The colors of this document |
protected HashMap |
documentExtGState
|
protected HashMap |
documentFonts
The fonts of this document |
protected HashMap |
documentPatterns
The patterns of this document |
protected HashMap |
documentShadingPatterns
|
protected HashMap |
documentShadings
|
protected HashMap |
documentSpotPatterns
|
private PdfDictionary |
extraCatalog
Holds value of property extraCatalog. |
static int |
FitWindow
A viewer preference |
protected int |
fontNumber
The font number counter for the fonts in the document. |
protected HashMap |
formXObjects
The form XObjects in this document. |
protected int |
formXObjectsCounter
The name counter for the form XObjects name. |
protected PdfDictionary |
group
|
protected byte[] |
HEADER
this is the header of a PDF document |
static int |
HideMenubar
A viewer preference |
static int |
HideToolbar
A viewer preference |
static int |
HideWindowUI
A viewer preference |
protected PdfDictionary |
imageDictionary
Dictionary, containing all the images of the PDF document |
private HashMap |
images
This is the list with all the images in the document. |
protected HashMap |
importedPages
|
static float |
NO_SPACE_CHAR_RATIO
Disable the inter-character spacing. |
static int |
NonFullScreenPageModeUseNone
A viewer preference |
static int |
NonFullScreenPageModeUseOutlines
A viewer preference |
static int |
NonFullScreenPageModeUseThumbs
A viewer preference |
static PdfName |
PAGE_CLOSE
|
static PdfName |
PAGE_OPEN
|
private PdfPageEvent |
pageEvent
The PdfPageEvent for this document. |
static int |
PageLayoutOneColumn
A viewer preference |
static int |
PageLayoutSinglePage
A viewer preference |
static int |
PageLayoutTwoColumnLeft
A viewer preference |
static int |
PageLayoutTwoColumnRight
A viewer preference |
static int |
PageModeFullScreen
A viewer preference |
static int |
PageModeUseNone
A viewer preference |
static int |
PageModeUseOutlines
A viewer preference |
static int |
PageModeUseThumbs
A viewer preference |
protected ArrayList |
pageReferences
The PdfIndirectReference to the pages. |
protected ColorDetails |
patternColorspaceCMYK
|
protected ColorDetails |
patternColorspaceGRAY
|
protected ColorDetails |
patternColorspaceRGB
|
protected int |
patternNumber
The patten number counter for the colors in the document. |
protected PdfDocument |
pdf
the pdfdocument object. |
protected PdfPages |
root
|
static int |
RUN_DIRECTION_DEFAULT
Use the default run direction. |
static int |
RUN_DIRECTION_LTR
Use bidirectional reordering with left-to-right preferential run direction. |
static int |
RUN_DIRECTION_NO_BIDI
Do not use bidirectional reordering. |
static int |
RUN_DIRECTION_RTL
Use bidirectional reordering with right-to-left preferential run direction. |
protected int |
runDirection
|
static int |
SIGNATURE_APPEND_ONLY
|
static int |
SIGNATURE_EXISTS
|
static float |
SPACE_CHAR_RATIO_DEFAULT
The defaukt space-char ratio. |
private float |
spaceCharRatio
The ratio between the extra word spacing and the extra character spacing. |
static boolean |
STRENGTH128BITS
Type of encryption |
static boolean |
STRENGTH40BITS
Type of encryption |
static char |
VERSION_1_2
|
static char |
VERSION_1_3
|
static char |
VERSION_1_4
|
static char |
VERSION_1_5
|
(package private) static int |
ViewerPreferencesMask
The mask to decide if a ViewerPreferences dictionary is needed |
private static int |
VPOINT
|
static PdfName |
WILL_PRINT
|
static PdfName |
WILL_SAVE
|
Fields inherited from class com.lowagie.text.DocWriter |
closeStream, document, EQUALS, FORWARD, GT, LT, NEWLINE, open, os, pageSize, pause, QUOTE, SPACE, TAB |
Constructor Summary | |
protected |
PdfWriter()
|
protected |
PdfWriter(PdfDocument document,
OutputStream os)
Constructs a PdfWriter .
|
Method Summary | |
protected PdfIndirectReference |
add(PdfICCBased icc)
|
(package private) PdfIndirectReference |
add(PdfImage pdfImage)
Writes a PdfImage to the outputstream. |
(package private) PdfIndirectReference |
add(PdfPage page,
PdfContents contents)
Adds some PdfContents to this Writer.
|
void |
addAnnotation(PdfAnnotation annot)
Adds a PdfAnnotation or a PdfFormField
to the document. |
(package private) void |
addAnnotation(PdfAnnotation annot,
int page)
|
void |
addCalculationOrder(PdfFormField annot)
Adds the PdfAnnotation to the calculation order
array. |
(package private) PdfName |
addDirectImageSimple(Image image)
Adds an image to the document but not to the page resources. |
(package private) PdfName |
addDirectTemplateSimple(PdfTemplate template)
Adds a template to the document but not to the page resources. |
void |
addJavaScript(PdfAction js)
Adds a JavaScript action at the document level. |
void |
addJavaScript(String code)
Adds a JavaScript action at the document level. |
void |
addJavaScript(String code,
boolean unicode)
Adds a JavaScript action at the document level. |
(package private) void |
addLocalDestinations(TreeMap dest)
Adds the local destinations to the body of the document. |
protected void |
addSharedObjectsToBody()
|
(package private) FontDetails |
addSimple(BaseFont bf)
Adds a BaseFont to the document but not to the page resources.
|
(package private) ColorDetails |
addSimple(PdfSpotColor spc)
Adds a SpotColor to the document but not to the page resources. |
(package private) PdfObject[] |
addSimpleExtGState(PdfDictionary gstate)
|
(package private) PdfName |
addSimplePattern(PdfPatternPainter painter)
|
(package private) ColorDetails |
addSimplePatternColorspace(Color color)
|
(package private) void |
addSimpleShading(PdfShading shading)
|
(package private) void |
addSimpleShadingPattern(PdfShadingPattern shading)
|
PdfIndirectObject |
addToBody(PdfObject object)
|
PdfIndirectObject |
addToBody(PdfObject object,
int refNumber)
|
PdfIndirectObject |
addToBody(PdfObject object,
PdfIndirectReference ref)
|
void |
close()
Signals that the Document was closed and that no other
Elements will be added.
|
(package private) void |
eliminateFontSubset(PdfDictionary fonts)
|
boolean |
fitsPage(PdfPTable table)
Checks if a PdfPTable fits the current page of the PdfDocument . |
boolean |
fitsPage(PdfPTable table,
float margin)
Checks if a PdfPTable fits the current page of the PdfDocument . |
boolean |
fitsPage(Table table)
Checks if a Table fits the current page of the PdfDocument . |
boolean |
fitsPage(Table table,
float margin)
Checks if a Table fits the current page of the PdfDocument . |
void |
freeReader(PdfReader reader)
Writes the reader to the document and frees the memory used by it. |
PdfAcroForm |
getAcroForm()
Gets the AcroForm object. |
protected PdfDictionary |
getCatalog(PdfIndirectReference rootObj)
|
int |
getCurrentDocumentSize()
Gets the current document size. |
(package private) PdfIndirectReference |
getCurrentPage()
|
(package private) int |
getCurrentPageNumber()
|
PdfContentByte |
getDirectContent()
Gets the direct content for this document. |
PdfContentByte |
getDirectContentUnder()
Gets the direct content under for this document. |
(package private) PdfEncryption |
getEncryption()
|
PdfDictionary |
getExtraCatalog()
|
PdfDictionary |
getGroup()
Getter for property group. |
(package private) PdfIndirectReference |
getImageReference(PdfName name)
return the PdfIndirectReference to the image with a given name. |
PdfImportedPage |
getImportedPage(PdfReader reader,
int pageNumber)
Gets a page from other PDF document. |
(package private) int |
getIndirectReferenceNumber()
|
PdfDictionary |
getInfo()
Gets the info dictionary for changing. |
static PdfWriter |
getInstance(Document document,
OutputStream os)
Gets an instance of the PdfWriter . |
static PdfWriter |
getInstance(Document document,
OutputStream os,
DocListener listener)
Gets an instance of the PdfWriter . |
protected int |
getNewObjectNumber(PdfReader reader,
int number,
int generation)
|
(package private) OutputStreamCounter |
getOs()
|
PdfPageEvent |
getPageEvent()
Gets the PdfPageEvent for this document or null
if none is set. |
int |
getPageNumber()
Gets the current pagenumber of this document. |
PdfIndirectReference |
getPageReference(int page)
Gets a reference to a page existing or not. |
(package private) PdfDocument |
getPdfDocument()
Gets the PdfDocument associated with this writer. |
PdfIndirectReference |
getPdfIndirectReference()
Gets a PdfIndirectReference for an object that
will be created in the future. |
(package private) RandomAccessFileOrArray |
getReaderFile(PdfReader reader)
|
PdfOutline |
getRootOutline()
Gets the root outline. |
int |
getRunDirection()
Gets the run direction. |
float |
getSpaceCharRatio()
Gets the space/character extra spacing ratio for fully justified text. |
float |
getTableBottom(Table table)
Sometimes it is necessary to know where the just added Table ends.
|
(package private) boolean |
isPaused()
Checks if writing is paused. |
boolean |
isStrictImageSequence()
Getter for property strictImageSequence. |
void |
open()
Signals that the Document has been opened and that
Elements can be added.
|
int |
reorderPages(int[] order)
Reorder the pages in the document. |
(package private) void |
resetContent()
Resets all the direct contents to empty. |
void |
setAdditionalAction(PdfName actionType,
PdfAction action)
Additional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole. |
void |
setCropBoxSize(Rectangle crop)
Sets the crop box. |
void |
setDuration(int seconds)
Sets the display duration for the page (for presentations) |
void |
setEncryption(boolean strength,
String userPassword,
String ownerPassword,
int permissions)
Sets the encryption options for this document. |
void |
setEncryption(byte[] userPassword,
byte[] ownerPassword,
int permissions,
boolean strength128Bits)
Sets the encryption options for this document. |
void |
setExtraCatalog(PdfDictionary extraCatalog)
Sets extra keys to the catalog. |
void |
setGroup(PdfDictionary group)
Setter for property group. |
void |
setLinearPageMode()
|
void |
setOpenAction(PdfAction action)
When the document opens this action will be
invoked. |
void |
setOpenAction(String name)
When the document opens it will jump to the destination with this name. |
void |
setPageAction(PdfName actionType,
PdfAction action)
Sets the open and close page additional action. |
void |
setPageEmpty(boolean pageEmpty)
|
void |
setPageEvent(PdfPageEvent pageEvent)
Sets the PdfPageEvent for this document. |
void |
setPageLabels(PdfPageLabels pageLabels)
Sets the page labels |
void |
setPdfVersion(char version)
Sets the PDF version. |
void |
setRunDirection(int runDirection)
Sets the run direction. |
void |
setSigFlags(int f)
Set the signature flags. |
void |
setSpaceCharRatio(float spaceCharRatio)
Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified. |
void |
setStrictImageSequence(boolean strictImageSequence)
Sets the image sequence to follow the text in strict order. |
void |
setTransition(PdfTransition transition)
Sets the transition for the page |
void |
setViewerPreferences(int preferences)
Sets the viewer preferences by ORing some of these constants: The page layout to be used when the document is opened (choose one). |
(package private) int |
size()
Returns the number of the next object that can be added to the body. |
Methods inherited from class com.lowagie.text.DocWriter |
add, add, addTabs, clearTextWrap, flush, getISOBytes, hasMarkupAttributes, isCloseStream, newPage, pause, removeWatermark, resetFooter, resetHeader, resetPageCount, resume, setCloseStream, setFooter, setHeader, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PageLayoutSinglePage
public static final int PageLayoutOneColumn
public static final int PageLayoutTwoColumnLeft
public static final int PageLayoutTwoColumnRight
public static final int PageModeUseNone
public static final int PageModeUseOutlines
public static final int PageModeUseThumbs
public static final int PageModeFullScreen
public static final int HideToolbar
public static final int HideMenubar
public static final int HideWindowUI
public static final int FitWindow
public static final int CenterWindow
public static final int NonFullScreenPageModeUseNone
public static final int NonFullScreenPageModeUseOutlines
public static final int NonFullScreenPageModeUseThumbs
public static final int DirectionL2R
public static final int DirectionR2L
static final int ViewerPreferencesMask
public static final int AllowPrinting
public static final int AllowModifyContents
public static final int AllowCopy
public static final int AllowModifyAnnotations
public static final int AllowFillIn
public static final int AllowScreenReaders
public static final int AllowAssembly
public static final int AllowDegradedPrinting
public static final boolean STRENGTH40BITS
public static final boolean STRENGTH128BITS
public static final PdfName DOCUMENT_CLOSE
public static final PdfName WILL_SAVE
public static final PdfName DID_SAVE
public static final PdfName WILL_PRINT
public static final PdfName DID_PRINT
public static final PdfName PAGE_OPEN
public static final PdfName PAGE_CLOSE
public static final int SIGNATURE_EXISTS
public static final int SIGNATURE_APPEND_ONLY
public static final char VERSION_1_2
public static final char VERSION_1_3
public static final char VERSION_1_4
public static final char VERSION_1_5
private static final int VPOINT
protected byte[] HEADER
protected PdfPages root
protected PdfDictionary imageDictionary
private HashMap images
protected HashMap formXObjects
protected int formXObjectsCounter
protected int fontNumber
protected int colorNumber
protected int patternNumber
protected PdfContentByte directContent
protected PdfContentByte directContentUnder
protected HashMap documentFonts
protected HashMap documentColors
protected HashMap documentPatterns
protected HashMap documentShadings
protected HashMap documentShadingPatterns
protected ColorDetails patternColorspaceRGB
protected ColorDetails patternColorspaceGRAY
protected ColorDetails patternColorspaceCMYK
protected HashMap documentSpotPatterns
protected HashMap documentExtGState
protected PdfWriter.PdfBody body
protected PdfDocument pdf
private PdfPageEvent pageEvent
PdfPageEvent
for this document.
protected PdfEncryption crypto
protected HashMap importedPages
protected PdfReaderInstance currentPdfReaderInstance
protected ArrayList pageReferences
protected int currentPageNumber
protected PdfDictionary group
public static final float SPACE_CHAR_RATIO_DEFAULT
public static final float NO_SPACE_CHAR_RATIO
public static final int RUN_DIRECTION_DEFAULT
public static final int RUN_DIRECTION_NO_BIDI
public static final int RUN_DIRECTION_LTR
public static final int RUN_DIRECTION_RTL
protected int runDirection
private float spaceCharRatio
ratio
times more than extra character spacing.
private PdfDictionary extraCatalog
Constructor Detail |
protected PdfWriter()
protected PdfWriter(PdfDocument document, OutputStream os)
PdfWriter
.
Remark: a PdfWriter can only be constructed by calling the method
getInstance(Document document, OutputStream os)
.
document
- The PdfDocument
that has to be writtenos
- The OutputStream
the writer has to write to.Method Detail |
public static PdfWriter getInstance(Document document, OutputStream os) throws DocumentException
PdfWriter
.
document
- The Document
that has to be writtenos
- The OutputStream
the writer has to write to.
PdfWriter
DocumentException
- on errorpublic static PdfWriter getInstance(Document document, OutputStream os, DocListener listener) throws DocumentException
PdfWriter
.
document
- The Document
that has to be writtenos
- The OutputStream
the writer has to write to.listener
- A DocListener
to pass to the PdfDocument.
PdfWriter
DocumentException
- on errorPdfIndirectReference add(PdfPage page, PdfContents contents) throws PdfException
PdfContents
to this Writer.
The document has to be open before you can begin to add content to the body of the document.
page
- the PdfPage
to addcontents
- the PdfContents
of the page
PdfIndirectReference
PdfException
- on errorPdfName addDirectImageSimple(Image image) throws PdfException, DocumentException
Document.add(Image)
.
image
- the Image
to add
PdfException
- on error
DocumentException
- on errorPdfIndirectReference add(PdfImage pdfImage) throws PdfException
PdfImage
to the outputstream.
pdfImage
- the image to be added
PdfIndirectReference
to the encapsulated image
PdfException
- when a document isn't open yet, or has been closedprotected PdfIndirectReference add(PdfICCBased icc) throws PdfException
PdfException
PdfIndirectReference getImageReference(PdfName name)
PdfIndirectReference
to the image with a given name.
name
- the name of the image
PdfIndirectReference
public void open()
Document
has been opened and that
Elements
can be added.
When this method is called, the PDF-document header is written to the outputstream.
open
in interface DocListener
open
in class DocWriter
protected PdfDictionary getCatalog(PdfIndirectReference rootObj)
protected void addSharedObjectsToBody() throws IOException
IOException
public void close()
Document
was closed and that no other
Elements
will be added.
The pages-tree is built and written to the outputstream. A Catalog is constructed, as well as an Info-object, the referencetable is composed and everything is written to the outputstream embedded in a Trailer.
close
in interface DocListener
close
in class DocWriter
int size()
public float getTableBottom(Table table)
Table
ends.
For instance to avoid to add another table in a page that is ending up, because
the new table will be probably splitted just after the header (it is an
unpleasant effect, isn't it?).
Added on September 8th, 2001
by Francesco De Milato
francesco.demilato@tiscalinet.it
table
- the Table
public boolean fitsPage(Table table, float margin)
Table
fits the current page of the PdfDocument
.
table
- the table that has to be checkedmargin
- a certain margin
true
if the Table
fits the page, false
otherwise.public boolean fitsPage(Table table)
Table
fits the current page of the PdfDocument
.
table
- the table that has to be checked
true
if the Table
fits the page, false
otherwise.public boolean fitsPage(PdfPTable table, float margin)
PdfPTable
fits the current page of the PdfDocument
.
table
- the table that has to be checkedmargin
- a certain margin
true
if the PdfPTable
fits the page, false
otherwise.public boolean fitsPage(PdfPTable table)
PdfPTable
fits the current page of the PdfDocument
.
table
- the table that has to be checked
true
if the PdfPTable
fits the page, false
otherwise.boolean isPaused()
true
if writing temporarely has to be paused, false
otherwise.public PdfContentByte getDirectContent()
public PdfContentByte getDirectContentUnder()
void resetContent()
public PdfAcroForm getAcroForm()
PdfAcroForm
public PdfOutline getRootOutline()
OutputStreamCounter getOs()
FontDetails addSimple(BaseFont bf)
BaseFont
to the document but not to the page resources.
It is used for templates.
bf
- the BaseFont
to add
Object[]
where position 0 is a PdfName
and position 1 is an PdfIndirectReference
void eliminateFontSubset(PdfDictionary fonts)
ColorDetails addSimple(PdfSpotColor spc)
SpotColor
to the document but not to the page resources.
spc
- the SpotColor
to add
Object[]
where position 0 is a PdfName
and position 1 is an PdfIndirectReference
ColorDetails addSimplePatternColorspace(Color color)
void addSimpleShadingPattern(PdfShadingPattern shading)
void addSimpleShading(PdfShading shading)
PdfObject[] addSimpleExtGState(PdfDictionary gstate)
PdfDocument getPdfDocument()
PdfDocument
associated with this writer.
PdfDocument
public PdfIndirectReference getPdfIndirectReference()
PdfIndirectReference
for an object that
will be created in the future.
PdfIndirectReference
int getIndirectReferenceNumber()
PdfName addSimplePattern(PdfPatternPainter painter)
PdfName addDirectTemplateSimple(PdfTemplate template)
template
- the template to add
PdfName
for this templatepublic void setPageEvent(PdfPageEvent pageEvent)
PdfPageEvent
for this document.
pageEvent
- the PdfPageEvent
for this documentpublic PdfPageEvent getPageEvent()
PdfPageEvent
for this document or null
if none is set.
PdfPageEvent
for this document or null
if none is setvoid addLocalDestinations(TreeMap dest) throws IOException
dest
- the HashMap
containing the destinations
IOException
- on errorpublic int getPageNumber()
public void setViewerPreferences(int preferences)
preferences
- the viewer preferencespublic void setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, boolean strength128Bits) throws DocumentException
userPassword
- the user password. Can be null or emptyownerPassword
- the owner password. Can be null or emptypermissions
- the user permissionsstrength128Bits
- true for 128 bit key length. false for 40 bit key length
DocumentException
- if the document is already openpublic void setEncryption(boolean strength, String userPassword, String ownerPassword, int permissions) throws DocumentException
strength
- true for 128 bit key length. false for 40 bit key lengthuserPassword
- the user password. Can be null or emptyownerPassword
- the owner password. Can be null or emptypermissions
- the user permissions
DocumentException
- if the document is already openpublic PdfIndirectObject addToBody(PdfObject object) throws IOException
IOException
public PdfIndirectObject addToBody(PdfObject object, PdfIndirectReference ref) throws IOException
IOException
public PdfIndirectObject addToBody(PdfObject object, int refNumber) throws IOException
IOException
public void setOpenAction(String name)
name
- the name of the destination to jump topublic void setAdditionalAction(PdfName actionType, PdfAction action) throws PdfException
DOCUMENT_CLOSE
,
WILL_SAVE
, DID_SAVE
, WILL_PRINT
and DID_PRINT
.
actionType
- the action typeaction
- the action to execute in response to the trigger
PdfException
- on invalid action typepublic void setOpenAction(PdfAction action)
action
will be
invoked.
action
- the action to be invokedpublic void setPageLabels(PdfPageLabels pageLabels)
pageLabels
- the page labelsPdfEncryption getEncryption()
RandomAccessFileOrArray getReaderFile(PdfReader reader)
protected int getNewObjectNumber(PdfReader reader, int number, int generation)
public PdfImportedPage getImportedPage(PdfReader reader, int pageNumber)
reader
- the PDF document where the page ispageNumber
- the page number. The first page is 1
public void addJavaScript(PdfAction js)
js
- The JavaScrip actionpublic void addJavaScript(String code, boolean unicode)
code
- the JavaScript codeunicode
- select JavaScript unicode. Note that the internal
Acrobat JavaScript engine does not support unicode,
so this may or may not work for youpublic void addJavaScript(String code)
code
- the JavaScript codepublic void setCropBoxSize(Rectangle crop)
crop
- the crop boxpublic PdfIndirectReference getPageReference(int page)
page
- the page number. The first page is 1
PdfIndirectReference getCurrentPage()
int getCurrentPageNumber()
public void addCalculationOrder(PdfFormField annot)
PdfAnnotation
to the calculation order
array.
annot
- the PdfAnnotation
to be addedpublic void setSigFlags(int f)
f
- the flags. This flags are ORed with current onespublic void addAnnotation(PdfAnnotation annot)
PdfAnnotation
or a PdfFormField
to the document. Only the top parent of a PdfFormField
needs to be added.
annot
- the PdfAnnotation
or the PdfFormField
to addvoid addAnnotation(PdfAnnotation annot, int page)
public void setPdfVersion(char version)
version
- the version numberpublic int reorderPages(int[] order) throws DocumentException
null
argument value
only returns the number of pages to process. It is
advisable to issue a Document.newPage()
before using this method.
order
- an array with the new page sequence. It must have the
same size as the number of pages.
DocumentException
- if all the pages are not present in the arraypublic float getSpaceCharRatio()
public void setSpaceCharRatio(float spaceCharRatio)
spaceCharRatio
times more than extra character spacing.
If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO
then the extra character spacing
will be zero.
spaceCharRatio
- the ratio between the extra word spacing and the extra character spacingpublic void setRunDirection(int runDirection)
runDirection
- the run directionpublic int getRunDirection()
public void setDuration(int seconds)
seconds
- the number of seconds to display the pagepublic void setTransition(PdfTransition transition)
transition
- the Transition objectpublic void freeReader(PdfReader reader) throws IOException
reader
- the PdfReader
to free
IOException
- on errorpublic void setPageAction(PdfName actionType, PdfAction action) throws PdfException
actionType
- the action type. It can be PdfWriter.PAGE_OPEN
or PdfWriter.PAGE_CLOSE
action
- the action to perform
PdfException
- if the action type is invalidpublic int getCurrentDocumentSize()
freeReader()
when concatenating many documents
and an idea of the current size is needed.
public boolean isStrictImageSequence()
public void setStrictImageSequence(boolean strictImageSequence)
strictImageSequence
- new value of property strictImageSequencepublic void setPageEmpty(boolean pageEmpty)
public PdfDictionary getInfo()
public PdfDictionary getExtraCatalog()
public void setExtraCatalog(PdfDictionary extraCatalog)
extraCatalog
- the extra keyspublic void setLinearPageMode()
public PdfDictionary getGroup()
public void setGroup(PdfDictionary group)
group
- New value of property group.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |