HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
Classes | |
class | PdfBody |
class | PdfTrailer |
Public Member Functions | |
float | GetVerticalPosition (bool ensureNewLine) |
PdfIndirectObject | AddToBody (PdfObject objecta) |
PdfIndirectObject | AddToBody (PdfObject objecta, bool inObjStm) |
PdfIndirectObject | AddToBody (PdfObject objecta, PdfIndirectReference refa) |
PdfIndirectObject | AddToBody (PdfObject objecta, PdfIndirectReference refa, bool inObjStm) |
PdfIndirectObject | AddToBody (PdfObject objecta, int refNumber) |
PdfIndirectObject | AddToBody (PdfObject objecta, int refNumber, bool inObjStm) |
void | SetLinearPageMode () |
int | ReorderPages (int[] order) |
virtual PdfIndirectReference | GetPageReference (int page) |
override void | Open () |
override void | Close () |
void | SetAtLeastPdfVersion (char version) |
void | SetPdfVersion (PdfName version) |
void | AddDeveloperExtension (PdfDeveloperExtension de) |
virtual void | AddViewerPreference (PdfName key, PdfObject value) |
virtual void | AddJavaScript (PdfAction js) |
virtual void | AddJavaScript (String code, bool unicode) |
virtual void | AddJavaScript (String code) |
void | AddJavaScript (String name, PdfAction js) |
void | AddJavaScript (String name, String code, bool unicode) |
void | AddJavaScript (String name, String code) |
virtual void | AddFileAttachment (String description, byte[] fileStore, String file, String fileDisplay) |
virtual void | AddFileAttachment (String description, PdfFileSpecification fs) |
void | AddFileAttachment (PdfFileSpecification fs) |
virtual void | SetOpenAction (String name) |
virtual void | SetOpenAction (PdfAction action) |
virtual void | SetAdditionalAction (PdfName actionType, PdfAction action) |
virtual void | AddAnnotation (PdfAnnotation annot) |
virtual void | AddCalculationOrder (PdfFormField annot) |
void | CreateXmpMetadata () |
bool | IsPdfX () |
void | SetOutputIntents (String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) |
void | SetOutputIntents (String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] destOutputProfile) |
bool | SetOutputIntents (PdfReader reader, bool checkExistence) |
void | SetEncryption (byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) |
void | SetEncryption (X509Certificate[] certs, int[] permissions, int encryptionType) |
void | SetEncryption (byte[] userPassword, byte[] ownerPassword, int permissions, bool strength128Bits) |
void | SetEncryption (bool strength, String userPassword, String ownerPassword, int permissions) |
void | SetEncryption (int encryptionType, String userPassword, String ownerPassword, int permissions) |
void | SetFullCompression () |
void | ReleaseTemplate (PdfTemplate tp) |
virtual PdfImportedPage | GetImportedPage (PdfReader reader, int pageNumber) |
virtual void | FreeReader (PdfReader reader) |
void | SetTagged () |
bool | IsTagged () |
void | AddOCGRadioGroup (ArrayList group) |
void | LockLayer (PdfLayer layer) |
void | SetBoxSize (String boxName, Rectangle size) |
Rectangle | GetBoxSize (String boxName) |
virtual void | SetPageAction (PdfName actionType, PdfAction action) |
void | SetDefaultColorspace (PdfName key, PdfObject cs) |
void | ClearTextWrap () |
PdfName | AddDirectImageSimple (Image image) |
PdfName | AddDirectImageSimple (Image image, PdfIndirectReference fixedRef) |
bool | FitsPage (Table table, float margin) |
bool | FitsPage (Table table) |
virtual void | ResetPageDictEntries () |
virtual void | AddPageDictEntry (PdfName key, PdfObject obj) |
virtual PdfAnnotation | CreateAnnotation (Rectangle rect, PdfName subtype) |
![]() | |
virtual bool | Add (IElement element) |
Signals that an Element was added to the Document. More... | |
virtual bool | SetPageSize (Rectangle pageSize) |
Sets the pagesize. More... | |
virtual bool | SetMargins (float marginLeft, float marginRight, float marginTop, float marginBottom) |
Sets the margins. More... | |
virtual bool | NewPage () |
Signals that an new page has to be started. More... | |
virtual void | ResetHeader () |
Resets the header of this document. More... | |
virtual void | ResetFooter () |
Resets the footer of this document. More... | |
virtual void | ResetPageCount () |
Sets the page number to 0. More... | |
virtual void | Pause () |
Let the writer know that all writing has to be paused. More... | |
bool | IsPaused () |
virtual void | Resume () |
Let the writer know that writing may be resumed. More... | |
virtual void | Flush () |
Flushes the Stream. More... | |
virtual bool | SetMarginMirroring (bool marginMirroring) |
virtual bool | SetMarginMirroringTopBottom (bool MarginMirroring) |
Static Public Member Functions | |
static PdfWriter | GetInstance (Document document, Stream os) |
static PdfWriter | GetInstance (Document document, Stream os, IDocListener listener) |
![]() | |
static byte[] | GetISOBytes (string text) |
Converts a string into a Byte array according to the ISO-8859-1 codepage. More... | |
Static Public Attributes | |
const int | GENERATION_MAX = 65535 |
const char | VERSION_1_2 = '2' |
const char | VERSION_1_3 = '3' |
const char | VERSION_1_4 = '4' |
const char | VERSION_1_5 = '5' |
const char | VERSION_1_6 = '6' |
const char | VERSION_1_7 = '7' |
static readonly PdfName | PDF_VERSION_1_2 = new PdfName("1.2") |
static readonly PdfName | PDF_VERSION_1_3 = new PdfName("1.3") |
static readonly PdfName | PDF_VERSION_1_4 = new PdfName("1.4") |
static readonly PdfName | PDF_VERSION_1_5 = new PdfName("1.5") |
static readonly PdfName | PDF_VERSION_1_6 = new PdfName("1.6") |
static readonly PdfName | PDF_VERSION_1_7 = new PdfName("1.7") |
const int | PageLayoutSinglePage = 1 |
const int | PageLayoutOneColumn = 2 |
const int | PageLayoutTwoColumnLeft = 4 |
const int | PageLayoutTwoColumnRight = 8 |
const int | PageLayoutTwoPageLeft = 16 |
const int | PageLayoutTwoPageRight = 32 |
const int | PageModeUseNone = 64 |
const int | PageModeUseOutlines = 128 |
const int | PageModeUseThumbs = 256 |
const int | PageModeFullScreen = 512 |
const int | PageModeUseOC = 1024 |
const int | PageModeUseAttachments = 2048 |
const int | HideToolbar = 1 << 12 |
const int | HideMenubar = 1 << 13 |
const int | HideWindowUI = 1 << 14 |
const int | FitWindow = 1 << 15 |
const int | CenterWindow = 1 << 16 |
const int | DisplayDocTitle = 1 << 17 |
const int | NonFullScreenPageModeUseNone = 1 << 18 |
const int | NonFullScreenPageModeUseOutlines = 1 << 19 |
const int | NonFullScreenPageModeUseThumbs = 1 << 20 |
const int | NonFullScreenPageModeUseOC = 1 << 21 |
const int | DirectionL2R = 1 << 22 |
const int | DirectionR2L = 1 << 23 |
const int | PrintScalingNone = 1 << 24 |
static PdfName | DOCUMENT_CLOSE = PdfName.WC |
static PdfName | WILL_SAVE = PdfName.WS |
static PdfName | DID_SAVE = PdfName.DS |
static PdfName | WILL_PRINT = PdfName.WP |
static PdfName | DID_PRINT = PdfName.DP |
const int | SIGNATURE_EXISTS = 1 |
const int | SIGNATURE_APPEND_ONLY = 2 |
const int | PDFXNONE = 0 |
const int | PDFX1A2001 = 1 |
const int | PDFX32002 = 2 |
const int | PDFA1A = 3 |
const int | PDFA1B = 4 |
const int | STANDARD_ENCRYPTION_40 = 0 |
const int | STANDARD_ENCRYPTION_128 = 1 |
const int | ENCRYPTION_AES_128 = 2 |
const int | DO_NOT_ENCRYPT_METADATA = 8 |
const int | EMBEDDED_FILES_ONLY = 24 |
const int | ALLOW_PRINTING = 4 + 2048 |
const int | ALLOW_MODIFY_CONTENTS = 8 |
const int | ALLOW_COPY = 16 |
const int | ALLOW_MODIFY_ANNOTATIONS = 32 |
const int | ALLOW_FILL_IN = 256 |
const int | ALLOW_SCREENREADERS = 512 |
const int | ALLOW_ASSEMBLY = 1024 |
const int | ALLOW_DEGRADED_PRINTING = 4 |
const int | AllowPrinting = ALLOW_PRINTING |
const int | AllowModifyContents = ALLOW_MODIFY_CONTENTS |
const int | AllowCopy = ALLOW_COPY |
const int | AllowModifyAnnotations = ALLOW_MODIFY_ANNOTATIONS |
const int | AllowFillIn = ALLOW_FILL_IN |
const int | AllowScreenReaders = ALLOW_SCREENREADERS |
const int | AllowAssembly = ALLOW_ASSEMBLY |
const int | AllowDegradedPrinting = ALLOW_DEGRADED_PRINTING |
const bool | STRENGTH40BITS = false |
const bool | STRENGTH128BITS = true |
static readonly PdfName | PAGE_OPEN = PdfName.O |
static readonly PdfName | PAGE_CLOSE = PdfName.C |
const float | SPACE_CHAR_RATIO_DEFAULT = 2.5f |
const float | NO_SPACE_CHAR_RATIO = 10000000f |
const int | RUN_DIRECTION_DEFAULT = 0 |
const int | RUN_DIRECTION_NO_BIDI = 1 |
const int | RUN_DIRECTION_LTR = 2 |
const int | RUN_DIRECTION_RTL = 3 |
![]() | |
const byte | NEWLINE = (byte)'\n' |
This is some byte that is often used. More... | |
const byte | TAB = (byte)'\t' |
This is some byte that is often used. More... | |
const byte | LT = (byte)'<' |
This is some byte that is often used. More... | |
const byte | SPACE = (byte)' ' |
This is some byte that is often used. More... | |
const byte | EQUALS = (byte)'=' |
This is some byte that is often used. More... | |
const byte | QUOTE = (byte)'\"' |
This is some byte that is often used. More... | |
const byte | GT = (byte)'>' |
This is some byte that is often used. More... | |
const byte | FORWARD = (byte)'/' |
This is some byte that is often used. More... | |
Protected Member Functions | |
PdfWriter () | |
PdfWriter (PdfDocument document, Stream os) | |
virtual PdfDictionary | GetCatalog (PdfIndirectReference rootObj) |
void | AddSharedObjectsToBody () |
void | FillOCProperties (bool erase) |
virtual PdfIndirectReference | Add (PdfICCBased icc) |
![]() | |
DocWriter () | |
DocWriter (Document document, Stream os) | |
Constructs a DocWriter. More... | |
void | Write (string str) |
Writes a string to the stream. More... | |
void | AddTabs (int indent) |
Writes a number of tabs. More... | |
void | Write (string key, string value) |
Writes a key-value pair to the stream. More... | |
void | WriteStart (string tag) |
Writes a starttag to the stream. More... | |
void | WriteEnd (string tag) |
Writes an endtag to the stream. More... | |
void | WriteEnd () |
Writes an endtag to the stream. More... | |
bool | WriteMarkupAttributes (Properties markup) |
Writes the markup attributes of the specified MarkupAttributes object to the stream. More... | |
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.
|
protected |
Constructs a PdfWriter
.
|
protected |
Constructs a PdfWriter
.
Remark: a PdfWriter can only be constructed by calling the method getInstance(Document document, Stream os)
.
document | The PdfDocument that has to be written |
os | The Stream the writer has to write to. |
|
protectedvirtual |
|
virtual |
Adds a 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 add |
Implements iTextSharp.text.pdf.interfaces.IPdfAnnotations.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp, and iTextSharp.text.pdf.PdfCopy.
|
virtual |
Adds the PdfAnnotation
to the calculation order array.
annot | the PdfAnnotation to be added |
Implements iTextSharp.text.pdf.interfaces.IPdfAnnotations.
void iTextSharp.text.pdf.PdfWriter.AddDeveloperExtension | ( | PdfDeveloperExtension | de | ) |
Implements iTextSharp.text.pdf.interfaces.IPdfVersion.
Adds an image to the document but not to the page resources. It is used with templates and Document.Add(Image)
.
image | the Image to add |
PdfException | on error |
DocumentException | on error |
PdfName iTextSharp.text.pdf.PdfWriter.AddDirectImageSimple | ( | Image | image, |
PdfIndirectReference | fixedRef | ||
) |
Adds an image to the document but not to the page resources. It is used with templates and Document.Add(Image)
.
image | the Image to add |
fixedRef | the reference to used. It may be null , a PdfIndirectReference or a PRIndirectReference . |
PdfException | on error |
DocumentException | on error |
void iTextSharp.text.pdf.PdfWriter.AddFileAttachment | ( | PdfFileSpecification | fs | ) |
Adds a file attachment at the document level.
fs | the file specification |
|
virtual |
Adds a file attachment at the document level.
description | the file description |
fileStore | an array with the file. If it's null the file will be read from the disk |
file | the path to the file. It will only be used if fileStore is not null |
fileDisplay | the actual file name stored in the pdf |
IOException | on error |
|
virtual |
Adds a file attachment at the document level.
description | the file description |
fs | the file specification |
|
virtual |
Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
js | The JavaScript action |
|
virtual |
Adds a JavaScript action at the document level. When the document opens all this JavaScript runs.
code | the JavaScript code |
|
virtual |
Adds a JavaScript action at the document level. When the document opens all this JavaScript runs.
code | the JavaScript code |
unicode | select JavaScript unicode. Note that the internal Acrobat JavaScript engine does not support unicode, so this may or may not work for you |
void iTextSharp.text.pdf.PdfWriter.AddJavaScript | ( | String | name, |
PdfAction | js | ||
) |
Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
name | The name of the JS Action in the name tree |
js | The JavaScript action |
void iTextSharp.text.pdf.PdfWriter.AddJavaScript | ( | String | name, |
String | code | ||
) |
Use this method to adds a JavaScript action at the document level. When the document opens, all this JavaScript runs.
name | The name of the JS Action in the name tree |
code | the JavaScript code |
void iTextSharp.text.pdf.PdfWriter.AddJavaScript | ( | String | name, |
String | code, | ||
bool | unicode | ||
) |
Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
name | The name of the JS Action in the name tree |
code | the JavaScript code |
unicode | select JavaScript unicode. Note that the internal Acrobat JavaScript engine does not support unicode, so this may or may not work for you |
void iTextSharp.text.pdf.PdfWriter.AddOCGRadioGroup | ( | ArrayList | group | ) |
Sets a collection of optional content groups whose states are intended to follow a "radio button" paradigm. That is, the state of at most one optional content group in the array should be ON at a time: if one group is turned ON, all others must be turned OFF.
group | the radio group |
|
protected |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta | ) |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta, |
bool | inObjStm | ||
) |
Adds an object to the PDF body.
object | |
inObjStm |
IOException |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta, |
int | refNumber | ||
) |
Adds an object to the PDF body.
object | |
refNumber |
IOException |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta, |
int | refNumber, | ||
bool | inObjStm | ||
) |
Adds an object to the PDF body.
object | |
refNumber | |
inObjStm |
IOException |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta, |
PdfIndirectReference | refa | ||
) |
Adds an object to the PDF body.
object | |
ref |
IOException |
PdfIndirectObject iTextSharp.text.pdf.PdfWriter.AddToBody | ( | PdfObject | objecta, |
PdfIndirectReference | refa, | ||
bool | inObjStm | ||
) |
Adds an object to the PDF body.
object | |
ref | |
inObjStm |
IOException |
|
virtual |
Adds a viewer preference
preferences | the viewer preferences |
Implements iTextSharp.text.pdf.interfaces.IPdfViewerPreferences.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
void iTextSharp.text.pdf.PdfWriter.ClearTextWrap | ( | ) |
Clears text wrapping around images (if applicable). Method suggested by Pelikan Stephan
DocumentException |
|
virtual |
Signals that the 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.
Reimplemented from iTextSharp.text.DocWriter.
|
virtual |
void iTextSharp.text.pdf.PdfWriter.CreateXmpMetadata | ( | ) |
Creates XMP Metadata based on the metadata in the PdfDocument.
|
protected |
bool iTextSharp.text.pdf.PdfWriter.FitsPage | ( | Table | table | ) |
Checks if a 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. bool iTextSharp.text.pdf.PdfWriter.FitsPage | ( | Table | table, |
float | margin | ||
) |
Checks if a Table
fits the current page of the PdfDocument
.
table | the table that has to be checked |
margin | a certain margin |
true
if the Table
fits the page, false
otherwise.
|
virtual |
Writes the reader to the document and frees the memory used by it. The main use is when concatenating multiple documents to keep the memory usage restricted to the current appending document.
reader | the PdfReader to free |
IOException | on error |
Reimplemented in iTextSharp.text.pdf.PdfCopy.
Rectangle iTextSharp.text.pdf.PdfWriter.GetBoxSize | ( | String | boxName | ) |
Gives the size of a trim, art, crop or bleed box, or null if not defined.
boxName | crop, trim, art or bleed |
|
protectedvirtual |
Reimplemented in iTextSharp.text.pdf.PdfCopy.
|
virtual |
Gets a page from other PDF document. The page can be used as any other PdfTemplate. Note that calling this method more than once with the same parameters will retrieve the same object.
reader | the PDF document where the page is |
pageNumber | the page number. The first page is 1 |
Reimplemented in iTextSharp.text.pdf.PdfCopy.
Use this method to get an instance of the PdfWriter
.
document | The Document that has to be written |
os | The Stream the writer has to write to. |
PdfWriter
DocumentException | on error |
|
static |
Use this method to get an instance of the PdfWriter
.
PdfWriter
document | The Document that has to be written |
os | The Stream the writer has to write to. |
listener | A DocListener to pass to the PdfDocument. |
DocumentException | on error |
|
virtual |
Use this method to get a reference to a page existing or not. If the page does not exist yet the reference will be created in advance. If on closing the document, a page number greater than the total number of pages was requested, an exception is thrown.
page | the page number. The first page is 1 |
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
float iTextSharp.text.pdf.PdfWriter.GetVerticalPosition | ( | bool | ensureNewLine | ) |
Use this method to get the current vertical page position.
ensureNewLine | Tells whether a new line shall be enforced. This may cause side effects for elements that do not terminate the lines they've started because those lines will get terminated. |
bool iTextSharp.text.pdf.PdfWriter.IsPdfX | ( | ) |
Implements iTextSharp.text.pdf.interfaces.IPdfXConformance.
bool iTextSharp.text.pdf.PdfWriter.IsTagged | ( | ) |
Check if the document is marked for tagging.
true
if the document is marked for tagging void iTextSharp.text.pdf.PdfWriter.LockLayer | ( | PdfLayer | layer | ) |
Use this method to lock an optional content group. The state of a locked group cannot be changed through the user interface of a viewer application. Producers can use this entry to prevent the visibility of content that depends on these groups from being changed by users.
layer | the layer that needs to be added to the array of locked OCGs |
|
virtual |
Signals that the Document
has been opened and that Elements
can be added.
When this method is called, the PDF-document header is written to the outputstream.
Reimplemented from iTextSharp.text.DocWriter.
void iTextSharp.text.pdf.PdfWriter.ReleaseTemplate | ( | PdfTemplate | tp | ) |
Releases the memory used by a template by writing it to the output. The template can still be added to any content but changes to the template itself won't have any effect.
tp | the template to release |
IOException | on error |
int iTextSharp.text.pdf.PdfWriter.ReorderPages | ( | int[] | order | ) |
Use this method to reorder the pages in the document. A 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 array |
|
virtual |
|
virtual |
Additional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole. The actions types allowed are: DOCUMENT_CLOSE
, WILL_SAVE
, DID_SAVE
, WILL_PRINT
and DID_PRINT
.
actionType | the action type |
action | the action to execute in response to the trigger |
PdfException | on invalid action type |
Implements iTextSharp.text.pdf.interfaces.IPdfDocumentActions.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
void iTextSharp.text.pdf.PdfWriter.SetAtLeastPdfVersion | ( | char | version | ) |
Implements iTextSharp.text.pdf.interfaces.IPdfVersion.
void iTextSharp.text.pdf.PdfWriter.SetBoxSize | ( | String | boxName, |
Rectangle | size | ||
) |
Sets the page box sizes. Allowed names are: "crop", "trim", "art" and "bleed".
boxName | the box size |
size | the size |
Sets the default colorspace that will be applied to all the document. The colorspace is only applied if another colorspace with the same name is not present in the content.
The colorspace is applied immediately when creating templates and at the page end for the main document content.
key | the name of the colorspace. It can be PdfName.DEFAULTGRAY , PdfName.DEFAULTRGB or PdfName.DEFAULTCMYK |
cs | the colorspace. A null or PdfNull removes any colorspace with the same name |
void iTextSharp.text.pdf.PdfWriter.SetEncryption | ( | bool | strength, |
String | userPassword, | ||
String | ownerPassword, | ||
int | permissions | ||
) |
Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
strength | true for 128 bit key length, false for 40 bit key length |
userPassword | the user password. Can be null or empty |
ownerPassword | the owner password. Can be null or empty |
permissions | the user permissions |
DocumentException | if the document is already open |
void iTextSharp.text.pdf.PdfWriter.SetEncryption | ( | byte[] | userPassword, |
byte[] | ownerPassword, | ||
int | permissions, | ||
bool | strength128Bits | ||
) |
Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
userPassword | the user password. Can be null or empty |
ownerPassword | the owner password. Can be null or empty |
permissions | the user permissions |
strength128Bits | true for 128 bit key length, false for 40 bit key length |
DocumentException | if the document is already open |
void iTextSharp.text.pdf.PdfWriter.SetEncryption | ( | byte[] | userPassword, |
byte[] | ownerPassword, | ||
int | permissions, | ||
int | encryptionType | ||
) |
Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
userPassword | the user password. Can be null or empty |
ownerPassword | the owner password. Can be null or empty |
permissions | the user permissions |
encryptionType | the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext |
DocumentException | if the document is already open |
Implements iTextSharp.text.pdf.interfaces.IPdfEncryptionSettings.
void iTextSharp.text.pdf.PdfWriter.SetEncryption | ( | int | encryptionType, |
String | userPassword, | ||
String | ownerPassword, | ||
int | permissions | ||
) |
Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
encryptionType | the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext |
userPassword | the user password. Can be null or empty |
ownerPassword | the owner password. Can be null or empty |
permissions | the user permissions |
DocumentException | if the document is already open |
void iTextSharp.text.pdf.PdfWriter.SetEncryption | ( | X509Certificate[] | certs, |
int[] | permissions, | ||
int | encryptionType | ||
) |
Sets the certificate encryption options for this document. An array of one or more public certificates must be provided together with an array of the same size for the permissions for each certificate. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext
certs | the public certificates to be used for the encryption |
permissions | the user permissions for each of the certicates |
encryptionType | the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128. |
DocumentException | if the document is already open |
Implements iTextSharp.text.pdf.interfaces.IPdfEncryptionSettings.
void iTextSharp.text.pdf.PdfWriter.SetFullCompression | ( | ) |
Sets the document's compression to the new 1.5 mode with object streams and xref streams. It can be set at any time but once set it can't be unset.
If set before opening the document it will also set the pdf version to 1.5.
void iTextSharp.text.pdf.PdfWriter.SetLinearPageMode | ( | ) |
Use this method to make sure the page tree has a lineair structure (every leave is attached directly to the root). Use this method to allow page reordering with method reorderPages.
|
virtual |
When the document opens this action
will be invoked.
action | the action to be invoked |
Implements iTextSharp.text.pdf.interfaces.IPdfDocumentActions.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
|
virtual |
When the document opens it will jump to the destination with this name.
name | the name of the destination to jump to |
Implements iTextSharp.text.pdf.interfaces.IPdfDocumentActions.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
bool iTextSharp.text.pdf.PdfWriter.SetOutputIntents | ( | PdfReader | reader, |
bool | checkExistence | ||
) |
Copies the output intent dictionary from other document to this one.
reader | the other document |
checkExistence | true to just check for the existence of a valid output intent dictionary, false to insert the dictionary if it exists |
IOException | on error |
true
if the output intent dictionary exists, false
otherwise void iTextSharp.text.pdf.PdfWriter.SetOutputIntents | ( | String | outputConditionIdentifier, |
String | outputCondition, | ||
String | registryName, | ||
String | info, | ||
byte[] | destOutputProfile | ||
) |
Sets the values of the output intent dictionary. Null values are allowed to suppress any key.
Prefer the ICC_Profile
-based version of this method.
outputConditionIdentifier | a value |
outputCondition | a value, "PDFA/A" to force GTS_PDFA1, otherwise cued by pdfxConformance. |
registryName | a value |
info | a value |
destOutputProfile | a value |
IOException |
void iTextSharp.text.pdf.PdfWriter.SetOutputIntents | ( | String | outputConditionIdentifier, |
String | outputCondition, | ||
String | registryName, | ||
String | info, | ||
ICC_Profile | colorProfile | ||
) |
Sets the values of the output intent dictionary. Null values are allowed to suppress any key.
outputConditionIdentifier | a value |
outputCondition | a value |
registryName | a value |
info | a value |
destOutputProfile | a value |
IOException | on error |
|
virtual |
Sets the open and close page additional action.
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 invalid |
Implements iTextSharp.text.pdf.interfaces.IPdfPageActions.
Reimplemented in iTextSharp.text.pdf.PdfStamperImp.
void iTextSharp.text.pdf.PdfWriter.SetPdfVersion | ( | PdfName | version | ) |
Implements iTextSharp.text.pdf.interfaces.IPdfVersion.
void iTextSharp.text.pdf.PdfWriter.SetTagged | ( | ) |
Mark this document for tagging. It must be called before open.
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
The operation permitted when the document is opened with the user password
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
A viewer preference
|
protected |
The color number counter for the colors in the document.
|
protected |
Contains the business logic for cryptography.
|
protected |
The current page number.
|
protected |
|
protected |
|
static |
action value
|
static |
action value
|
protected |
The direct content in this document.
|
protected |
The direct content under in this document.
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
Add this to the mode to keep the metadata in clear text
|
static |
action value
|
protected |
The colors of this document
|
protected |
|
protected |
The fonts of this document
|
protected |
|
protected |
|
protected |
The patterns of this document
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Add this to the mode to keep encrypt only the embedded files.
|
static |
Type of encryption
|
static |
A viewer preference
|
protected |
The font number counter for the fonts in the document.
|
protected |
The form XObjects in this document. The key is the xref and the value is Object[]{PdfName, template}.
|
protected |
The name counter for the form XObjects name.
|
protected |
Holds value of property fullCompression.
|
static |
The highest generation number possible.
|
protected |
A group attributes dictionary specifying the attributes of the page’s page group for use in the transparent imaging model
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
protected |
Dictionary, containing all the images of the PDF document
|
protected |
|
protected |
A Hashtable with Stream objects containing JBIG2 Globals
|
protected |
|
static |
Disable the inter-character spacing.
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
protected |
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
static |
A viewer preference
|
protected |
The PdfIndirectReference to the pages.
|
protected |
|
protected |
|
protected |
|
protected |
The patten number counter for the colors in the document.
|
protected |
Stores the version information for the header and the catalog.
possible PDF version (catalog)
possible PDF version (catalog)
possible PDF version (catalog)
possible PDF version (catalog)
possible PDF version (catalog)
possible PDF version (catalog)
|
static |
PDFA-1A level.
|
static |
PDFA-1B level.
|
static |
PDF/X level
|
static |
PDF/X level
|
static |
PDF/X level
|
protected |
A number refering to the previous Cross-Reference Table.
|
static |
A viewer preference
|
protected |
The root of the page tree.
|
static |
Use the default run direction.
|
static |
Use bidirectional reordering with left-to-right preferential run direction.
|
static |
Do not use bidirectional reordering.
|
static |
Use bidirectional reordering with right-to-left preferential run direction.
|
protected |
|
static |
signature value
|
static |
signature value
|
static |
The default space-char ratio.
|
static |
Type of encryption
|
static |
Type of encryption
|
static |
|
static |
|
protected |
|
protected |
The value of the Tabs entry in the page dictionary.
|
protected |
|
protected |
|
static |
possible PDF version (header)
|
static |
possible PDF version (header)
|
static |
possible PDF version (header)
|
static |
possible PDF version (header)
|
static |
possible PDF version (header)
|
static |
possible PDF version (header)
|
protected |
|
static |
action value
|
static |
action value
|
protected |
XMP Metadata for the document.
|
get |
Gets the AcroForm object.
PdfAcroForm
|
set |
Sets the Collection dictionary.
collection | a dictionary of type PdfCollection |
|
getset |
Sets the compression level to be used for streams written by this writer.
compressionLevel | a value between 0 (best speed) and 9 (best compression) |
|
set |
Sets the crop box. The crop box should not be rotated even if the page is rotated. This change only takes effect in the next page.
crop | the crop box |
|
get |
Gets the current document size. This size only includes the data already writen to the output stream, it does not include templates or fonts. It is usefull if used with freeReader()
when concatenating many documents and an idea of the current size is needed.
|
get |
|
get |
Gets the default colorspaces.
|
get |
Use this method to get the direct content for this document. There is only one direct content, multiple calls to this method will allways retrieve the same object.
|
get |
Use this method to get the direct content under for this document. There is only one direct content, multiple calls to this method will allways retrieve the same object.
|
set |
Sets the display duration for the page (for presentations)
seconds | the number of seconds to display the page |
|
get |
Sets extra keys to the catalog.
|
get |
Gets the 1.5 compression status.
true
if the 1.5 compression is on
|
getset |
|
get |
Use this method to get the info dictionary if you want to change it directly (add keys and values to the info dictionary).
|
get |
Gets the Optional Content Properties Dictionary. Each call fills the dictionary with the current layer state. It's advisable to only call this method right before close and do any modifications at that time.
|
set |
Sets the bookmarks. The list structure is defined in SimpleBookmark.
outlines | the bookmarks or null to remove any |
|
get |
|
set |
If you use SetPageEmpty(false), invoking NewPage() after a blank page will add a newPage.
pageEmpty | the state |
|
getset |
Gets the PdfPageEvent
for this document or null
if none is set.
PdfPageEvent
for this document or null
if none is set
|
set |
Use this method to add page labels
pageLabels | the page labels |
|
get |
Gets the pagenumber of this document. This number can be different from the real pagenumber, if you have (re)set the page number previously.
|
get |
Gives the size of the media box.
|
set |
Use this method to set the XMP Metadata for each page.
xmpMetadata | The xmpMetadata to set. |
|
get |
Gets a PdfIndirectReference
for an object that will be created in the future.
PdfIndirectReference
|
set |
|
getset |
Sets the PDFX conformance level. Allowed values are PDFX1A2001 and PDFX32002. It must be called before opening the document.
pdfxConformance | the conformance level |
|
getset |
Sets the transparency blending colorspace to RGB. The default blending colorspace is CMYK and will result in faded colors in the screen and in printing. Calling this method will return the RGB colors to what is expected. The RGB blending will be applied to all subsequent pages until other value is set. Note that this is a generic solution that may not work in all cases.
rgbTransparencyBlending | true to set the transparency blending colorspace to RGB, false to use the default blending colorspace |
|
get |
Use this method to get the root outline and construct bookmarks.
|
getset |
Sets the run direction. This is only used as a placeholder as it does not affect anything.
runDirection | the run direction |
|
set |
Set the signature flags.
f | the flags. This flags are ORed with current ones |
|
getset |
Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified. Extra word spacing will grow 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 spacing |
|
getset |
Sets the image sequence to follow the text in strict order.
strictImageSequence | new value of property strictImageSequence |
|
get |
Gets the structure tree root. If the document is not marked for tagging it will return null
.
|
getset |
|
set |
Sets the the thumbnail image for the current page.
image | the image |
PdfException | on error |
DocumentException | or error |
|
set |
Sets the transition for the page
transition | the Transition object |
|
getset |
Sets the flag indicating the presence of structure elements that contain user properties attributes.
userProperties | the user properties flag |
|
getset |
A UserUnit is a value that defines the default user space unit. The minimum UserUnit is 1 (1 unit = 1/72 inch). The maximum UserUnit is 75,000. Remark that this userunit only works starting with PDF1.6!
|
set |
Sets the viewer preferences as the sum of several constants.
preferences | the viewer preferences |
|
getset |
Sets XMP Metadata.
xmpMetadata | The xmpMetadata to set. |