|
|||||||||
| 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
com.lowagie.text.pdf.PdfStamperImp
class PdfStamperImp
| Nested Class Summary | |
|---|---|
(package private) static class |
PdfStamperImp.PageStamp
|
| Nested classes/interfaces inherited from class com.lowagie.text.pdf.PdfWriter |
|---|
PdfWriter.PdfBody, PdfWriter.PdfTrailer |
| Field Summary | |
|---|---|
protected AcroFields |
acroFields
|
protected boolean |
append
|
(package private) boolean |
closed
|
protected boolean |
fieldsAdded
|
protected java.util.HashMap |
fieldTemplates
|
(package private) RandomAccessFileOrArray |
file
|
protected boolean |
flat
|
protected boolean |
flatFreeText
|
protected int |
initialXrefSize
|
protected IntHashtable |
marked
|
(package private) IntHashtable |
myXref
|
protected boolean |
namedAsNames
|
protected int[] |
namePtr
|
protected java.util.List |
newBookmarks
|
protected PdfAction |
openAction
|
(package private) java.util.HashMap |
pagesToContent
Integer(page number) -> PageStamp |
protected java.util.HashSet |
partialFlattening
|
(package private) PdfReader |
reader
|
(package private) java.util.HashMap |
readers2file
|
(package private) java.util.HashMap |
readers2intrefs
|
private boolean |
rotateContents
Holds value of property rotateContents. |
protected int |
sigFlags
|
protected boolean |
useVp
|
protected int |
vp
|
| Fields inherited from class com.lowagie.text.DocWriter |
|---|
closeStream, document, EQUALS, FORWARD, GT, LT, NEWLINE, open, os, pageSize, pause, QUOTE, SPACE, TAB |
| Constructor Summary | |
|---|---|
PdfStamperImp(PdfReader reader,
java.io.OutputStream os,
char pdfVersion,
boolean append)
Creates new PdfStamperImp. |
|
| Method Summary | |
|---|---|
void |
addAnnotation(PdfAnnotation annot)
Adds a PdfAnnotation or a PdfFormField
to the document. |
(package private) void |
addAnnotation(PdfAnnotation annot,
int page)
|
(package private) void |
addAnnotation(PdfAnnotation annot,
PdfDictionary pageN)
|
void |
addComments(FdfReader fdf)
|
(package private) void |
addDocumentField(PdfIndirectReference ref)
|
(package private) void |
addFieldResources()
|
(package private) void |
alterContents()
|
(package private) void |
alterResources(PdfStamperImp.PageStamp ps)
|
(package private) void |
applyRotation(PdfDictionary pageN,
ByteBuffer out)
|
(package private) void |
close(java.util.HashMap moreInfo)
|
(package private) void |
correctAcroFieldPages(int page)
|
(package private) void |
deleteOutlines()
|
(package private) void |
eliminateAcroformObjects()
|
(package private) void |
expandFields(PdfFormField field,
java.util.ArrayList allAnnots)
|
(package private) static void |
findAllObjects(PdfReader reader,
PdfObject obj,
IntHashtable hits)
|
(package private) void |
flatFields()
|
private void |
flatFreeTextFields()
|
(package private) AcroFields |
getAcroFields()
|
PdfContentByte |
getDirectContent()
Gets the direct content for this document. |
PdfContentByte |
getDirectContentUnder()
Gets the direct content under for this document. |
protected int |
getNewObjectNumber(PdfReader reader,
int number,
int generation)
|
(package private) PdfContentByte |
getOverContent(int pageNum)
|
PdfIndirectReference |
getPageReference(int page)
Gets a reference to a page existing or not. |
(package private) PdfStamperImp.PageStamp |
getPageStamp(int pageNum)
|
(package private) RandomAccessFileOrArray |
getReaderFile(PdfReader reader)
|
(package private) PdfContentByte |
getUnderContent(int pageNum)
|
(package private) void |
insertPage(int pageNumber,
Rectangle mediabox)
|
(package private) boolean |
isAppend()
Getter for property append. |
(package private) boolean |
isContentWritten()
|
(package private) boolean |
isRotateContents()
Getter for property rotateContents. |
protected void |
markUsed(int num)
|
protected void |
markUsed(PdfObject obj)
|
private void |
outlineTravel(PRIndirectReference outline)
|
(package private) boolean |
partialFormFlattening(java.lang.String name)
|
void |
registerReader(PdfReader reader,
boolean openFile)
|
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 |
setDuration(int seconds)
Always throws an UnsupportedOperationException. |
(package private) void |
setDuration(int seconds,
int page)
Sets the display duration for the page (for presentations) |
(package private) void |
setFormFlattening(boolean flat)
|
(package private) void |
setFreeTextFlattening(boolean flat)
|
(package private) void |
setJavaScript()
|
void |
setOpenAction(PdfAction action)
When the document opens this action will be
invoked. |
void |
setOpenAction(java.lang.String name)
When the document opens it will jump to the destination with this name. |
(package private) void |
setOutlines()
|
(package private) void |
setOutlines(java.util.List outlines)
|
void |
setPageAction(PdfName actionType,
PdfAction action)
Always throws an UnsupportedOperationException. |
(package private) void |
setPageAction(PdfName actionType,
PdfAction action,
int page)
Sets the open and close page additional action. |
(package private) void |
setRotateContents(boolean rotateContents)
Setter for property rotateContents. |
void |
setSigFlags(int f)
Set the signature flags. |
void |
setThumbnail(Image image)
Sets the the thumbnail image for the current page. |
(package private) void |
setThumbnail(Image image,
int page)
|
void |
setTransition(PdfTransition transition)
Always throws an UnsupportedOperationException. |
(package private) void |
setTransition(PdfTransition transition,
int page)
Sets the transition for the page |
void |
setViewerPreferences(int preferences)
Sets the viewer preferences. |
(package private) void |
sweepKids(PdfObject obj)
|
void |
unRegisterReader(PdfReader reader)
|
| 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, setMarginMirroring, 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 |
|---|
java.util.HashMap readers2intrefs
java.util.HashMap readers2file
RandomAccessFileOrArray file
PdfReader reader
IntHashtable myXref
java.util.HashMap pagesToContent
boolean closed
private boolean rotateContents
protected AcroFields acroFields
protected boolean flat
protected boolean flatFreeText
protected int[] namePtr
protected boolean namedAsNames
protected java.util.List newBookmarks
protected java.util.HashSet partialFlattening
protected boolean useVp
protected int vp
protected java.util.HashMap fieldTemplates
protected boolean fieldsAdded
protected int sigFlags
protected boolean append
protected IntHashtable marked
protected int initialXrefSize
protected PdfAction openAction
| Constructor Detail |
|---|
PdfStamperImp(PdfReader reader,
java.io.OutputStream os,
char pdfVersion,
boolean append)
throws DocumentException,
java.io.IOException
reader - the read PDFos - the output destinationpdfVersion - the new pdf version or '\0' to keep the same version as the original
documentappend -
DocumentException - on error
java.io.IOException| Method Detail |
|---|
void close(java.util.HashMap moreInfo)
throws DocumentException,
java.io.IOException
DocumentException
java.io.IOException
void applyRotation(PdfDictionary pageN,
ByteBuffer out)
void alterContents()
throws java.io.IOException
java.io.IOExceptionvoid alterResources(PdfStamperImp.PageStamp ps)
protected int getNewObjectNumber(PdfReader reader,
int number,
int generation)
getNewObjectNumber in class PdfWriterRandomAccessFileOrArray getReaderFile(PdfReader reader)
getReaderFile in class PdfWriter
public void registerReader(PdfReader reader,
boolean openFile)
throws java.io.IOException
reader - openFile -
java.io.IOExceptionpublic void unRegisterReader(PdfReader reader)
reader -
static void findAllObjects(PdfReader reader,
PdfObject obj,
IntHashtable hits)
public void addComments(FdfReader fdf)
throws java.io.IOException
fdf -
java.io.IOExceptionPdfStamperImp.PageStamp getPageStamp(int pageNum)
PdfContentByte getUnderContent(int pageNum)
PdfContentByte getOverContent(int pageNum)
void correctAcroFieldPages(int page)
void insertPage(int pageNumber,
Rectangle mediabox)
boolean isRotateContents()
void setRotateContents(boolean rotateContents)
rotateContents - New value of property rotateContents.boolean isContentWritten()
AcroFields getAcroFields()
void setFormFlattening(boolean flat)
void setFreeTextFlattening(boolean flat)
boolean partialFormFlattening(java.lang.String name)
void flatFields()
void eliminateAcroformObjects()
void sweepKids(PdfObject obj)
private void flatFreeTextFields()
public PdfIndirectReference getPageReference(int page)
PdfWriter
getPageReference in class PdfWriterpage - the page number. The first page is 1
PdfWriter.getPageReference(int)public void addAnnotation(PdfAnnotation annot)
PdfWriterPdfAnnotation or a PdfFormField
to the document. Only the top parent of a PdfFormField
needs to be added.
addAnnotation in class PdfWriterannot - the PdfAnnotation or the PdfFormField to addPdfWriter.addAnnotation(com.lowagie.text.pdf.PdfAnnotation)void addDocumentField(PdfIndirectReference ref)
void addFieldResources()
void expandFields(PdfFormField field,
java.util.ArrayList allAnnots)
void addAnnotation(PdfAnnotation annot,
PdfDictionary pageN)
void addAnnotation(PdfAnnotation annot,
int page)
addAnnotation in class PdfWriterprivate void outlineTravel(PRIndirectReference outline)
void deleteOutlines()
void setJavaScript()
throws java.io.IOException
java.io.IOException
void setOutlines()
throws java.io.IOException
java.io.IOExceptionvoid setOutlines(java.util.List outlines)
public void setViewerPreferences(int preferences)
setViewerPreferences in class PdfWriterpreferences - the viewer preferencesPdfWriter.setViewerPreferences(int)public void setSigFlags(int f)
setSigFlags in class PdfWriterf - the flags. This flags are ORed with current ones
public void setPageAction(PdfName actionType,
PdfAction action)
throws PdfException
UnsupportedOperationException.
setPageAction in class PdfWriteractionType - ignoreaction - ignore
PdfException - ignorePdfStamper.setPageAction(PdfName, PdfAction, int)
void setPageAction(PdfName actionType,
PdfAction action,
int page)
throws PdfException
actionType - the action type. It can be PdfWriter.PAGE_OPEN
or PdfWriter.PAGE_CLOSEaction - the action to performpage - the page where the action will be applied. The first page is 1
PdfException - if the action type is invalidpublic void setDuration(int seconds)
UnsupportedOperationException.
setDuration in class PdfWriterseconds - ignorepublic void setTransition(PdfTransition transition)
UnsupportedOperationException.
setTransition in class PdfWritertransition - ignore
void setDuration(int seconds,
int page)
seconds - the number of seconds to display the page. A negative value removes the entrypage - the page where the duration will be applied. The first page is 1
void setTransition(PdfTransition transition,
int page)
transition - the transition object. A null removes the transitionpage - the page where the transition will be applied. The first page is 1protected void markUsed(PdfObject obj)
protected void markUsed(int num)
boolean isAppend()
public void setAdditionalAction(PdfName actionType,
PdfAction action)
throws PdfException
DOCUMENT_CLOSE,
WILL_SAVE, DID_SAVE, WILL_PRINT
and DID_PRINT.
setAdditionalAction in class PdfWriteractionType - the action typeaction - the action to execute in response to the trigger
PdfException - on invalid action typepublic void setOpenAction(PdfAction action)
PdfWriteraction will be
invoked.
setOpenAction in class PdfWriteraction - the action to be invokedPdfWriter.setOpenAction(com.lowagie.text.pdf.PdfAction)public void setOpenAction(java.lang.String name)
PdfWriter
setOpenAction in class PdfWritername - the name of the destination to jump toPdfWriter.setOpenAction(java.lang.String)public void setThumbnail(Image image)
PdfWriter
setThumbnail in class PdfWriterimage - the imagePdfWriter.setThumbnail(com.lowagie.text.Image)
void setThumbnail(Image image,
int page)
throws PdfException,
DocumentException
PdfException
DocumentExceptionpublic PdfContentByte getDirectContentUnder()
PdfWriter
getDirectContentUnder in class PdfWriterpublic PdfContentByte getDirectContent()
PdfWriter
getDirectContent in class PdfWriter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||