UglyToad.PdfPig A collection of interactive fields for gathering data from a user through dropdowns, textboxes, checkboxes, etc. Each with form functionality contains a single spread across one or more pages. The name AcroForm distinguishes this from the other form type called form XObjects which act as templates for repeated sections of content. The raw PDF dictionary which is the root form object. Document-level characteristics related to signature fields. Whether all widget annotations need appearance dictionaries and streams. All root fields in this form. Create a new . Get the set of fields which appear on the given page number. Extensions for AcroForm. Get fields containing data in form. Get fields containing data which are children of field. Get string values of field. Extracts the from the document, if available. Retrieve the from the document, if applicable. The if the document contains one. Flags specifying various characteristics of a button type field in an . The user may not change the value of the field. The field must have a value before the form can be submitted. Must not be exported by the submit form action. For radio buttons, one radio button must be set at all times. The field is a set of radio buttons. The field is a push button. For radio buttons a group of radio buttons will toggle on/off at the same time based on their initial value. A set of related checkboxes. Create a new . A checkbox which may be toggled on or off. The which define the behaviour of this button type. The current value of this checkbox. Whether this checkbox is currently checked/on. Create a new . Flags specifying various characteristics of a choice type field in an . The user may not change the value of the field. The field must have a value before the form can be submitted. Must not be exported by the submit form action. The field is a combo box. The combo box includes an editable text box. must be set. The options should be sorted alphabetically, this should be ignored by viewer applications. The field allows multiple options to be selected. The text entered in the field is not spell checked. and must be set. Any associated field action is fired when the selection is changed rather than on losing focus. An option in a choice field, either or . The index of this option in the array. Whether this option is selected. The text of the option. The value of the option when the form is exported. Whether the field defined an export value for this option. Create a new . A combo box consisting of a drop-down list optionally accompanied by an editable text box in which the user can type a value other than the predefined choices. The flags specifying the behaviour of this field. The options to be presented to the user. The names of any currently selected options. For multiple select lists with duplicate names gives the indices of the selected options. Create a new . The dictionary for this field. The type of this field, must be . The flags specifying behaviour for this field. Additional information for this field. The options in this field. The indices of the selected options where there are multiple with the same name. The names of the selected options. The number of the page this field appears on. The location of this field on the page. A field in an interactive . The raw PDF dictionary for this field. The representing the type of this field in PDF format. The actual represented by this field. Specifies various characteristics of the field. The optional information common to all types of field. The page number of the page containing this form field if known. The placement rectangle of this form field on the page given by if known. Create a new . The dictionary for this field. The PDF string type of this field. The flags specifying behaviour for this field. The type of this field. Additional information for this field. The number of the page this field appears on. The location of this field on the page. Information from the field dictionary which is common across all field types. All of this information is optional. The reference to the field which is the parent of this one, if applicable. The partial field name for this field. The fully qualified field name is the period '.' joined name of all parents' partial names and this field's partial name. The alternate field name to be used instead of the fully qualified field name where the field is being identified on the user interface or by screen readers. The mapping name used when exporting form field data from the document. Create a new . Indicates the type of field for a . A button that immediately to user input without retaining state. A set of checkboxes. A checkbox which toggles between on and off states. A set of radio buttons. A single radio button, as part of a set or on its own. A textbox allowing user input through the keyboard. A dropdown list of options with optional user-editable textbox. A list of options for the user to select from. A field containing a digital signature. The field type wasn't specified. A scrollable list box field. The flags specifying the behaviour of this field. The options to be presented to the user. The names of any currently selected options. For multiple select lists with duplicate names gives the indices of the selected options. For scrollable list boxes gives the index of the first visible option. Whether the field allows multiple selections. Create a new . The dictionary for this field. The type of this field, must be . The flags specifying behaviour for this field. Additional information for this field. The options in this field. The indices of the selected options where there are multiple with the same name. The first visible option index. The names of the selected options. The number of the page this field appears on. The location of this field on the page. A non-leaf field in the form's structure. The child fields of this field. Create a new . A push button responds immediately to user input without storing any state. The which define the behaviour of this button type. Create a new . A single radio button. The which define the behaviour of this button type. The current value of this radio button. Whether the radio button is currently on/active. Create a new . A set of radio buttons. The which define the behaviour of this button type. Create a new . A digital signature field. Create a new . A text field is a box or space in which the user can enter text from the keyboard. The text may be restricted to a single line or may be permitted to span multiple lines. The flags specifying the behaviour of this field. The value of the text in this text field. This can be if no value has been set. The optional maximum length of the text field. Whether the field supports rich text content. Whether the field allows multiline text. Create a new . The dictionary for this field. The type of this field, must be . The flags specifying behaviour for this field. Additional information for this field. The text value. The maximum length. The number of the page this field appears on. The location of this field on the page. Flags specifying various characteristics of a text type field in an . The user may not change the value of the field. The field must have a value before the form can be submitted. Must not be exported by the submit form action. The field can contain multiple lines of text. The field is for a password and should not be displayed as text and should not be stored to file. The field represents a file path selection. The text entered is not spell checked. The field does not scroll if the text exceeds the bounds of the field. For a text field which is not a , or the field text is evenly spaced by splitting into 'combs' based on the MaxLen entry in the field dictionary. The value of the field is a rich text string. Specifies document level characteristics for any signature fields in the document's . The document contains at least one signature field. The document contains signatures which may be invalidated if the file is saved in a way which alters its previous content rather than simply appending new content. Abstract class for GoTo-type actions (GoTo, GoToE, GoToR) that have a destination Destination for the GoTo-type action Constructor Get an action (A) from dictionary. If GoTo, GoToR or GoToE, also fetches the action destination. Action types (PDF reference 8.5.3) Go to a destination in the current document. (“Go-to remote”) Go to a destination in another document. (“Go-to embedded”; PDF 1.6) Go to a destination in an embedded file. Launch an application, usually to open a file. Begin reading an article thread. Resolve a uniform resource identifier. (PDF 1.2) Play a sound. (PDF 1.2) Play a movie. (PDF 1.2) Set an annotation’s Hidden flag. (PDF 1.2) Execute an action predefined by the viewer application. (PDF 1.2) Send data to a uniform resource locator. (PDF 1.2) Set fields to their default values. (PDF 1.2) Import field values from a file. (PDF 1.3) Execute a JavaScript script. (PDF 1.5) Set the states of optional content groups. (PDF 1.5) Controls the playing of multimedia content. (PDF 1.5) Updates the display of a document, using a transition dictionary. (PDF 1.6) Set the current view of a 3D annotation GoTo action (with a destination inside the current document) Constructor GoToE action (to go to a destination inside a file embedded within the PDF) File specification of the embedded file Constructor Destination within the embedded file Specification of the embedded file GoToR action, to go to a destination in a remote PDF Filename of the remote PDF Constructor Destination within the remote PDF Filename of the remote PDF Actions (PDF reference 8.5) Type of action Constructor Action to open a URI URI to open Constructor URI to open Provides access to rare or advanced features from the PDF specification. Get any embedded files contained in this PDF document. Since PDF 1.3 any external file referenced by the document may have its contents embedded within the referring PDF file, allowing its contents to be stored or transmitted along with the PDF file. The set of embedded files in this document. if this document contains more than zero embedded files, otherwise . Replaces the token in an internal cache that will be returned instead of scanning the source PDF data for future requests. The object number for the object to replace. Func that takes existing token as input and return new token. Replaces the token in an internal cache that will be returned instead of scanning the source PDF data for future requests. The object number for the object to replace. Replacement token to use. An annotation on a page in a PDF document. The underlying PDF dictionary which this annotation was created from. The type of this annotation. The rectangle in user space units specifying the location to place this annotation on the page. The annotation text, or if the annotation does not display text, a description of the annotation's contents. Optional. The name of this annotation which should be unique per page. Optional. The date and time the annotation was last modified, can be in any format. Optional. Flags defining the appearance and behaviour of this annotation. Defines the annotation's border. Rectangles defined using QuadPoints, for these are the regions used to activate the link, for text markup annotations these are the text regions to apply the markup to. See for more information regarding the order of the points. Action for this annotation, if any (can be null) Indicates if a normal appearance is present for this annotation Indicates if a roll over appearance is present for this annotation (shown when you hover over this annotation) Indicates if a down appearance is present for this annotation (shown when you click on this annotation) The this annotation was in reply to. Can be Create a new . A border for a PDF object. The default border style if not specified. The horizontal corner radius in user space units. The vertical corner radius in user space units. The width of the border in user space units. The dash pattern for the border lines if provided. Optional. Create a new . Specifies characteristics of an annotation in a PDF or FDF document. Do not display the annotation if it is not one of the standard annotation types. Do not display or print the annotation irrespective of type. Do not allow interaction. The annotation should be included when the document is physically printed. Do not zoom/scale the annotation as the zoom of the document is changed. Do not rotate the annotation as the page is rotated. Do not display the annotation in viewer applications as with , however allow the annotation to be printed if is set. Allow the annotation to be displayed/printed if applicable but do not respond to user interaction, e.g. mouse clicks. Do not allow deleting the annotation or changing size/position but allow the contents to be modified. Invert the meaning of the flag. Allow the annotation to be deleted, resized, moved or restyled but disallow changes to the annotation contents. Opposite to . The standard annotation types in PDF documents. A 'sticky note' style annotation displaying some text with open/closed pop-up state. A link to elsewhere in the document or an external application/web link. Displays text on the page. Unlike there is no associated pop-up. Display a single straight line on the page with optional line ending styles. Display a rectangle on the page. Display an ellipse on the page. Display a closed polygon on the page. Display a set of connected lines on the page which is not a closed polygon. A highlight for text or content with associated annotation texyt. An underline under text with associated annotation text. A jagged squiggly line under text with associated annotation text. A strikeout through some text with associated annotation text. Text or graphics intended to display as if inserted by a rubber stamp. A visual symbol indicating the presence of text edits. A freehand 'scribble' formed by one or more paths. Displays text in a pop-up window for entry or editing. A file. A sound to be played through speakers. Embeds a movie from a file in a PDF document. Used by interactive forms to represent field appearance and manage user interactions. Specifies a page region for media clips to be played and actions to be triggered from. Represents a symbol used during the physical printing process to maintain output quality, e.g. color bars or cut marks. Used during the physical printing process to prevent colors mixing. Adds a watermark at a fixed size and position irrespective of page size. Represents a 3D model/artwork, for example from CAD, in a PDF document. A custom annotation type. Appearance stream (PDF Reference 8.4.4) that describes what an annotation looks like. Each stream is a Form XObject. The appearance stream is either stateless (in which case is true) or stateful, in which case is false and the states can be retrieved via . The states can then be used to retrieve the state-specific appearances using . Indicates if this appearance stream is stateless, or whether you can get appearances by state. Get list of states. If this is a stateless appearance stream, an empty collection is returned. Constructor for stateless appearance stream Constructor for stateful appearance stream Get appearance stream for particular state A QuadPoints quadrilateral is four points defining the region for an annotation to use. An annotation may cover multiple quadrilaterals. The 4 points defining this quadrilateral. The PDF specification defines these as being in anti-clockwise order starting from the lower-left corner, however Adobe's implementation doesn't obey the specification and points seem to go in the order: top-left, top-right, bottom-left, bottom-right. See: https://stackoverflow.com/questions/9855814/pdf-spec-vs-acrobat-creation-quadpoints. Create a new . Artifacts are graphics objects that are not part of the author's original content but rather are generated by the conforming writer in the course of pagination, layout, or other strictly mechanical processes. Artifacts may also be used to describe areas of the document where the author uses a graphical background, with the goal of enhancing the visual experience. In such a case, the background is not required for understanding the content. - PDF 32000-1:2008, Section 14.8.2.2 The artifact's type: Pagination, Layout, Page, or (PDF 1.7) Background. The artifact's subtype. Standard values are Header, Footer, and Watermark. Additional values may be specified for this entry, provided they comply with the naming conventions. The artifact's attribute owners. The artifact's bounding box. The names of regions this element is attached to. Is the artifact attached to the top edge? Is the artifact attached to the bottom edge? Is the artifact attached to the left edge? Is the artifact attached to the right edge? If present, shall be one of the names Pagination, Layout, Page, or (PDF 1.7) Background. Unknown artifact type. Ancillary page features such as running heads and folios (page numbers). Purely cosmetic typographical or design elements such as footnote rules or background screens. Production aids extraneous to the document itself, such as cut marks and colour bars. (PDF 1.7) Images, patterns or coloured blocks that either run the entire length and/or width of the page or the entire dimensions of a structural element. Background artifacts typically serve as a background for content shown either on top of or placed adjacent to that background. A background artifact can further be classified as visual content that serves to enhance the user experience, that lies under the actual content, and that is not required except to retain visual fidelity. The root of the document's object hierarchy. Contains references to objects defining the contents, outline, named destinations and more. The catalog dictionary containing assorted information. Create a new . Defines the visible region of a page, contents expanding beyond the crop box should be clipped. Defines the clipping of the content when the page is displayed or printed. The page's contents are to be clipped (cropped) to this rectangle and then imposed on the output medium. Create a new . Metadata for the PDF document. The underlying document information PDF dictionary from the document. The title of this document if applicable. The name of the person who created this document if applicable. The subject of this document if applicable. Any keywords associated with this document if applicable. The name of the application which created the original document before it was converted to PDF if applicable. The name of the application used to convert the original document to PDF if applicable. The date and time the document was created. The date and time the document was most recently modified. Gets the as a if it's possible to convert it, or . Gets the as a if it's possible to convert it, or . Gets a string representing this document information. entries are not shown. A file embedded in a PDF document for document references. The name given to this embedded file in the document's name tree. The specification of the path to the file. The decrypted bytes of the file. The underlying embedded file stream. The offset in bytes from the start of the file to the start of the version comment. Full details for a link annotation which references an external resource. A link to an external resource in a document. The area on the page which when clicked will open the hyperlink. The text in the link region (if any). The letters in the link region. The URI the link directs to. The underlying link annotation. Create a new . A small image that is completely defined directly inline within a 's content stream. Create a new . An image in a PDF document, may be an or a PostScript image XObject (). The placement rectangle of the image in PDF coordinates. The width of the image in samples. The height of the image in samples. The number of bits used to represent each color component. The encoded bytes of the image with all filters still applied. The color rendering intent to be used when rendering the image. Indicates whether the image is to be treated as an image mask. If the image is a monochrome image in which each sample is specified by a single bit ( is 1). The image represents a stencil where sample values represent places on the page that should be marked with the current color or masked (not marked). Describes how to map image samples into the values appropriate for the . The image data is initially composed of values in the range 0 to 2^n - 1 where n is . The decode array contains a pair of numbers for each component in the . The value from the image data is then interpolated into the values relevant to the using the corresponding values of the decode array. Specifies whether interpolation is to be performed. Interpolation smooths images where a single component in the image as defined may correspond to many pixels on the output device. The interpolation algorithm is implementation dependent and is not defined by the specification. Whether this image is an or a . The full dictionary for this image object. The used to interpret the image. This is not defined where is and is optional where the image is JPXEncoded for . Get the decoded bytes of the image if applicable. For JPEG images and some other types the should be used directly. Try to convert the image to PNG. Doesn't support conversion of JPG to PNG. Remove any named resources and associated state for the last resource dictionary loaded. Does not affect the cached resources, just the labels associated with them. A glyph or combination of glyphs (characters) drawn by a PDF content stream. The text for this letter or unicode character. Text orientation of the letter. The placement position of the character in PDF space. See The placement position of the character in PDF space (the start point of the baseline). See The end point of the baseline. The width occupied by the character within the PDF content. Position of the bounding box for the glyph, this is the box surrounding the visible glyph as it appears on the page. For example letters with descenders, p, j, etc., will have a box extending below the they are placed at. The width of the glyph may also be more or less than the allocated for the character in the PDF content. Size as defined in the PDF file. This is not equivalent to font size in points but is relative to other font sizes on the page. The name of the font. Details about the font for this letter. Text rendering mode that indicates whether we should draw this letter's strokes, fill, both, neither (in case of hidden text), etc. If it calls for stroking the is used. If it calls for filling, the is used. In modes that perform both filling and stroking, the effect is as if each glyph outline were filled and then stroked in separate operations. The primary color of the letter, which is either the in case is , or otherwise it is the . Stroking color Non-stroking (fill) color The size of the font in points. Sequence number of the ShowText operation that printed this letter. Create a new letter to represent some text drawn by the Tj operator. Produces a string representation of the letter and its position. A marked content element can be used to provide application specific data in the page's content stream. Interpretation of the marked content is outside of the PDF specification. Marked-content identifier. The index of this marked content element in the set of marked content in the page. marked content elements will have the same index as the parent. A name indicating the role or significance of the point. The properties for this element. Is the marked content an artifact, see . Child contents. Letters contained in this marked content. Paths contained in this marked content. Images contained in this marked content. The natural language specification. The replacement text. The alternate description. The abbreviation expansion text. Create a new . The boundary of the physical medium to display or print on. See table 3.27 from the PDF specification version 1.7. User space units per inch. User space units per millimeter. A the size of U.S. Letter, 8.5" x 11" Paper. A the size of U.S. Legal, 8.5" x 14" Paper. A the size of A0 Paper. A the size of A1 Paper. A the size of A2 Paper. A the size of A3 Paper. A the size of A4 Paper. A the size of A5 Paper. A the size of A6 Paper. A rectangle, expressed in default user space units, that defines the boundaries of the physical medium on which the page shall be displayed or printed. Create a new . An optional content group is a dictionary representing a collection of graphics that can be made visible or invisible dynamically by users of viewers applications. The type of PDF object that this dictionary describes. Must be OCG for an optional content group dictionary. The name of the optional content group, suitable for presentation in a viewer application's user interface. A single name or an array containing any combination of names. Default value is 'View'. A usage dictionary describing the nature of the content controlled by the group. Underlying . Contains the content and provides access to methods of a single page in the . The raw PDF dictionary token for this page in the document. The page number (starting at 1). Defines the visible region of the page, content outside the is clipped/cropped. Defines the boundaries of the physical medium on which the page shall be displayed or printed. The rotation of the page in degrees (clockwise). Valid values are 0, 90, 180 and 270. The set of s drawn by the PDF content. The full text of all characters on the page in the order they are presented in the PDF content. Gets the width of the page in points. Gets the height of the page in points. The size of the page according to the standard page sizes or if no matching standard size found. The number of images on this page. Use to access the image contents. The parsed graphics state operations in the content stream for this page. Access to members whose future locations within the API will change without warning. Use the default to get the words for this page. The words on this page. Use a custom to get the words for this page. The word extractor to use to generate words. The words on this page. Get the hyperlinks which link to external resources on the page. These are based on the annotations on the page with a type of '/Link'. Gets any images on the page. Gets any marked content on the page. Provides access to useful members which will change in future releases. The set of s drawn by the PDF content. Get the annotation objects from the page. The lazily evaluated set of annotations on this page. Gets any optional content on the page. Does not handle XObjects and annotations for the time being. Wraps content parsed from a page content stream for access. This should contain a replayable stack of drawing instructions for page content from a content stream in addition to lazily evaluated state such as text on the page or images. Represents the rotation of a page in a PDF document defined by the page dictionary in degrees clockwise. The rotation of the page in degrees clockwise. Whether the rotation flips the x and y axes. Get the rotation expressed in radians (anti-clockwise). Create a . Rotation in degrees clockwise, must be a multiple of 90. Equal. Not equal. The page tree for this document containing all pages, page numbers and their dictionaries. The corresponding named size of the . Unknown page size, did not match a defined page size. The ISO 216 A0 page size. The ISO 216 A1 page size. The ISO 216 A2 page size. The ISO 216 A3 page size. The ISO 216 A4 page size. The ISO 216 A5 page size. The ISO 216 A6 page size. The ISO 216 A7 page size. The ISO 216 A8 page size. The ISO 216 A9 page size. The ISO 216 A10 page size. The North American Letter page size. The North American Legal page size. The North American Ledger page size. The North American Tabloid page size. The North American Executive page size. Contains the values inherited from the Page Tree for this page. A node in the PDF document's page tree. Nodes may either be of type 'Page' - a single page, or 'Pages' - a container for multiple child Page or Pages nodes. The dictionary for this node in the page tree. The indirect reference for this node in the page tree. Whether this node is a page or not. If not it must be a /Pages container. The number of this page if is . The child nodes of this node if is The parent node of this node, unless it is the root node. Whether this node is the root node. Create a new . Orientation of the text. Other text orientation. Usual text orientation (Left to Right). Horizontal text, upside down. Rotated text going down. Rotated text going up. A word. The text of the word. The text orientation of the word. The rectangle completely containing the word. The name of the font for the word. The letters contained in the word. Create a new . The letters contained in the word, in the correct order. Bound angle so that -180 ≤ θ ≤ 180. The angle to bound. Wraps an XML based Extensible Metadata Platform (XMP) document. These XML documents are embedded in PDFs to provide metadata about objects (the entire document, images, etc). They can be present as plain text or encoded/encrypted streams. The underlying for this metadata. Get the decoded bytes for the metadata stream. This can be interpreted as a sequence of plain-text bytes. The bytes for the metadata object with any filters removed. Gets the metadata stream as an . The for the XMP XML. The cross-reference table contains information that enables random access to PDF objects within the file by object number so that specific objects can be located directly without having to scan the whole document. A PDF document may contain multiple cross reference tables, this class provides access to the merged result with the latest offset for each object. The offsets of the original cross reference tables or streams merged into this result are available in the list. The corresponding byte offset for each keyed object in this document. The type of the first cross-reference table located in this document. The trailer dictionary. The byte offsets of each cross-reference table or stream in this document and the previous table or stream they link to if applicable. The offset of a cross-reference table or stream in the document. The offset in bytes from the start of the document where the stream or table starts. The offset in bytes from the start of the document where the previous stream or table in a document containing incremental updates can be found, if applicable. Create a new . The offset in bytes from the start of the document where the stream or table starts. The offset in bytes from the start of the document where the previous stream or table in a document starts. The table contains a one-line entry for each indirect object, specifying the location of that object within the body of the file. The format of an in-use entry is nnnnnnnnnn ggggg n eol where nnnnnnnnnn is a 10-digit byte offset ggggg is a 5-digit generation number n is a literal keyword identifying this as an in-use entry eol is a 2-character end-of-line sequence The byte offset is a 10-digit number, padded with leading zeros if necessary, giving the number of bytes from the beginning of the file to the beginning of the object. For Xref streams indicated by tables they should be used together when constructing the final table. The type of a cross-reference section in a PDF document. A cross-reference table. A cross-reference stream. Contains information for interpreting the cross-reference table. The total number of object entries across both the original cross-reference table and in any incremental updates. Any object in a cross-reference section whose number is greater than this value is ignored and considered missing. The offset in bytes to the previous cross-reference table or stream if the document has more than one cross-reference section. The object reference for the document's catalog dictionary. The object reference for the document's information dictionary if it contains one. A list containing two-byte string tokens which act as file identifiers. The document's encryption dictionary. Create a new . The parsed dictionary from the document. The method used by the consumer application to decrypt data. The application does not decrypt data but directs the input stream to the security handler for decryption. The application asks the security handler for the encryption key and implicitly decrypts data using the RC4 algorithm. (PDF 1.6) The application asks the security handler for the encryption key and implicitly decrypts data using the AES algorithm in Cipher Block Chaining (CBC) mode with a 16-byte block size and an initialization vector that is randomly generated and placed as the first 16 bytes in the stream or string. The application asks the security handler for the encryption key and implicitly decrypts data using the AES-256 algorithm in Cipher Block Chaining (CBC) with padding mode with a 16-byte block size and an initialization vector that is randomly generated and placed as the first 16 bytes in the stream or string. The key size shall be 256 bits. The event to be used to trigger the authorization that is required to access encryption keys used by this filter. Authorization is required when a document is opened. Authorization is required when accessing embedded files. A code specifying the algorithm to be used in encrypting and decrypting the document. An algorithm that is undocumented and no longer supported. RC4 or AES encryption using a key of 40 bits. RC4 or AES encryption using a key of more than 40 bits. An unpublished algorithm that permits encryption key lengths ranging from 40 to 128 bits. The security handler defines the use of encryption and decryption in the document with a key length of 128 bits. The security handler defines the use of encryption and decryption in the document with a key length of 256 bits. Since ISO isn't fit for purpose they charge £200 to see the PDF 2 spec so it's not possible to know what the specification for this revision is. Required if is 5 or above. A 32-byte string, based on the owner and user passwords that is used in computing the encryption key. Required if is 5 or above. A 32-byte string, based on the user password that is used in computing the encryption key. This is the revision 6 algorithm the specification for which can't be viewed unless you pay the ISO a lot of money (which makes me extremely angry). This is an attempt to port directly from PDFBox code. The truncated user or owner password. The 8 byte user or owner key validation salt. Used when hashing owner password in which case it is the 48 byte /U key. Manages decryption of tokens in a PDF document where encryption is used. (Revision 2) Print the document. (Revision 3 or greater) Print the document (possibly not at the highest quality level, see ). Modify the contents of the document by operations other than those controlled by , and . (Revision 2) Copy or otherwise extract text and graphics from the document, including extracting text and graphics (in support of accessibility to users with disabilities or for other purposes). (Revision 3 or greater) Copy or otherwise extract text and graphics from the document by operations other than that controlled by . Add or modify text annotations, fill in interactive form fields, and, if is also set, create or modify interactive form fields (including signature fields). (Revision 3 or greater) Fill in existing interactive form fields (including signature fields), even if is clear. (Revision 3 or greater) Extract text and graphics (in support of accessibility to users with disabilities or for other purposes). (Revision 3 or greater) Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if is clear. (Revision 3 or greater) Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is clear (and is set), printing is limited to a low-level representation of the appearance, possibly of degraded quality. The document is encrypted and cannot be decrypted. ASCII 85 (Base85) is a binary to text encoding using 5 ASCII characters per 4 bytes of data. Encodes/decodes data using the ASCII hexadecimal encoding where each byte is represented by two ASCII characters. Specifies the compression type to use with . Modified Huffman (MH) - Group 3 variation (T2) Modified Huffman (MH) - Group 3 (T4) Modified Read (MR) - Group 3 (T4) Modified Modified Read (MMR) - Group 4 (T6) Decodes image data that has been encoded using either Group 3 or Group 4. Ported from https://github.com/apache/pdfbox/blob/714156a15ea6fcfe44ac09345b01e192cbd74450/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java CCITT Modified Huffman RLE, Group 3 (T4) and Group 4 (T6) fax compression. Ported from https://github.com/apache/pdfbox/blob/e644c29279e276bde14ce7a33bdeef0cb1001b3e/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java Creates a CCITTFaxDecoderStream. This constructor may be used for CCITT streams embedded in PDF files, which use EncodedByteAlign. The default implementation of the . The single instance of this provider. The Flate filter is based on the public-domain zlib/deflate compression method, a variable-length Lempel-Ziv adaptive compression method cascaded with adaptive Huffman coding. It is fully defined in Internet RFCs 1950, ZLIB Compressed Data Format Specification, and 1951, DEFLATE Compressed Data Format Specification See section 3.3.3 of the spec (version 1.7) for details on the FlateDecode filter. The flate decode filter may have a predictor function to further compress the stream. A filter is used in a PDF to encode/decode data either to compress it or derive an ASCII representation of the data. Whether this library can decode information encoded using this filter. Decodes data encoded using this filter type. The encoded bytes which were encoded using this filter. The dictionary of the (or other dictionary types, e.g. inline images) containing these bytes. The position of this filter in the pipeline used to encode data. The decoded bytes. Gets filter implementations () for decoding PDF data. Get the filters specified in this dictionary. Gets the filters specified by the filter names. Get all available filters in this library. The LZW (Lempel-Ziv-Welch) filter is a variable-length, adaptive compression method that has been adopted as one of the standard compression methods in the Tag Image File Format (TIFF) standard. GetLongOrDefault value from bit interval from a byte Set value input a bit interval and return that value The Run Length filterencodes data in a simple byte-oriented format based on run length. The encoded data is a sequence of runs, where each run consists of a length byte followed by 1 to 128 bytes of data. This class represents a function in a PDF document. The function dictionary. The function stream. This class represents a function in a PDF document. This class represents a function in a PDF document. Returns the function type. Possible values are: 0Sampled function 2Exponential interpolation function 3Stitching function 4PostScript calculator function the function type. Returns the function's dictionary. If is defined, it will be returned. If not, the 's StreamDictionary will be returned. This will get the number of output parameters that have a range specified. A range for output parameters is optional so this may return zero for a function that does have output parameters, this will simply return the number that have the range specified. The number of output parameters that have a range specified. This will get the range for a certain output parameters. This is will never return null. If it is not present then the range 0 to 0 will be returned. The output parameter number to get the range for. The range for this component. This will get the number of input parameters that have a domain specified. The number of input parameters that have a domain specified. This will get the range for a certain input parameter. This is will never return null. If it is not present then the range 0 to 0 will be returned. The parameter number to get the domain for. The domain range for this component. Evaluates the function at the given input. ReturnValue = f(input) The array of input values for the function. In many cases will be an array of a single value, but not always. The of outputs the function returns based on those inputs. In many cases will be an array of a single value, but not always. Returns all ranges for the output values as . Required for type 0 and type 4 functions. the ranges array. Returns all domains for the input values as . Required for all function types. the domains array. Clip the given input values to the ranges. inputValues the input values the clipped values Clip the given input value to the given range. x the input value the min value of the range the max value of the range the clipped value For a given value of x, interpolate calculates the y value on the line defined by the two points (xRangeMin, xRangeMax) and (yRangeMin, yRangeMax). the value to be interpolated value. the min value of the x range the max value of the x range the min value of the y range the max value of the y range the interpolated y value Pdf function types. Sampled function. Exponential interpolation function. Stitching function. PostScript calculator function. The samples of the function. Stitching function Stitching function The "Size" entry, which is the number of samples in each input dimension of the sample table. An array of m positive integers specifying the number of samples in each input dimension of the sample table. Get the number of bits that the output value will take up. Valid values are 1,2,4,8,12,16,24,32. Number of bits for each output value. Get the order of interpolation between samples. Valid values are 1 and 3, specifying linear and cubic spline interpolation, respectively. Default is 1. See p.170 in PDF spec 1.7. order of interpolation. An array of 2 x m numbers specifying the linear mapping of input values into the domain of the function's sample table. Default value: [ 0 (Size0 - 1) 0 (Size1 - 1) ...]. An array of 2 x n numbers specifying the linear mapping of sample values into the range appropriate for the function's output values. Default value: same as the value of Range. Get the encode for the input parameter. The function parameter number. The encode parameter range or null if none is set. Get the decode for the input parameter. The function parameter number. The decode parameter range or null if none is set. Inner class do to an interpolation in the Nth dimension by comparing the content size of N-1 dimensional objects.This is done with the help of recursive calls. To understand the algorithm without recursion, see for a bilinear interpolation and for trilinear interpolation. Constructor. the input coordinates coordinate of the "ceil" point coordinate of the "floor" point Calculate the interpolation. interpolated result sample Do a linear interpolation if the two coordinates can be known, or call itself recursively twice. partially set coordinate (not set from step upwards); gets fully filled in the last call ("leaf"), where it is used to get the correct sample between 0 (first call) and dimension - 1 interpolated result sample calculate array index (structure described in p.171 PDF spec 1.7) in multiple dimensions. with coordinates index in flat array Get all sample values of this function. an array with all samples. Exponential interpolation function Exponential interpolation function The C0 values of the function, 0 if empty. The C1 values of the function, 1 if empty. The exponent of the function. Stitching function Stitching function Stitching function Returns all functions values. Returns all bounds values as . the bounds array. Returns all encode values as . the encode array. Get the encode for the input parameter. The function parameter number. The encode parameter range or null if none is set. PostScript calculator function PostScript calculator function Provides the arithmetic operators such as "add" and "sub". the "Abs" operator. the "add" operator. the "atan" operator. the "ceiling" operator. the "cos" operator. the "cvi" operator. the "cvr" operator. the "div" operator. the "exp" operator. the "floor" operator. the "idiv" operator. the "ln" operator. the "log" operator. the "mod" operator. the "mul" operator. the "neg" operator. the "round" operator. the "sin" operator. the "sqrt" operator. the "sub" operator. the "truncate" operator. Abstract base class for logical operators. Implements the "and" operator. Implements the "bitshift" operator. Implements the "false" operator. Implements the "not" operator. Implements the "or" operator. Implements the "true" operator. Implements the "xor" operator. Provides the conditional operators such as "if" and "ifelse". Implements the "if" operator. Implements the "ifelse" operator. The stack used by this execution context. Creates a new execution context. the operator set Returns the operator set used by this execution context. the operator set Pops a number (int or real) from the stack. If it's neither data type, a is thrown. the number Pops a value of type int from the stack. If the value is not of type int, a is thrown. the int value Pops a number from the stack and returns it as a real value. If the value is not of a numeric type, a is thrown. the real value Add a name (ex. an operator) the name Adds an int value. the value Adds a real value. the value Adds a bool value. the value Adds a proc (sub-sequence of instructions). the child proc Executes the instruction sequence. the execution context Basic parser for Type 4 functions which is used to build up instruction sequences. Returns the instruction sequence that has been build from the syntactic elements. the instruction sequence Parses the given text into an instruction sequence representing a Type 4 function that can be executed. the Type 4 function text the instruction sequence Interface for PostScript operators.e Executes the operator. The method can inspect and manipulate the stack. the execution context This class provides all the supported operators. Creates a new Operators object with the default set of operators. Returns the operator for the given operator name. the operator name the operator (or null if there's no such operator Parser for PDF Type 4 functions. This implements a small subset of the PostScript language but is no full PostScript interpreter. Used to indicate the parsers current state. Parses a Type 4 function and sends the syntactic elements to the given syntax handler. the text source the syntax handler This interface defines all possible syntactic elements of a Type 4 function. It is called by the parser as the function is interpreted. Indicates that a new line starts. the new line character (CR, LF, CR/LF or FF) Called when whitespace characters are encountered. the whitespace text Called when a token is encountered. No distinction between operators and values is done here. the token text Called for a comment. the comment Abstract base class for a . Tokenizer for Type 4 functions. Provides the relational operators such as "eq" and "le". Implements the "eq" operator. Abstract base class for number comparison operators. Implements the "ge" operator. Implements the "gt" operator. Implements the "le" operator. Implements the "lt" operator. Implements the "ne" operator. Provides the stack operators such as "Pop" and "dup". Implements the "copy" operator. Implements the "dup" operator. Implements the "exch" operator. Implements the "index" operator. Implements the "Pop" operator. Implements the "roll" operator. returns 0 if false, +1 if true, -1 if pt ON polygon boundary. See "The Point in Polygon Problem for Arbitrary Polygons" by Hormann and Agathos Convert self-intersecting polygons into simple polygons. Convert self-intersecting polygons into simple polygons. This function is more accurate when the point that's GEOMETRICALLY between the other 2 points is the one that's tested for distance. nb: with 'spikes', either pt1 or pt3 is geometrically between the other pts"> Clean polygon. proximity in units/pixels below which vertices will be stripped. Default ~= sqrt(2) so when adjacent vertices or semi-adjacent vertices have both x and y coords within 1 unit, then the second vertex will be stripped. Clean polygon. proximity in units/pixels below which vertices will be stripped. Default ~= sqrt(2) so when adjacent vertices or semi-adjacent vertices have both x and y coords within 1 unit, then the second vertex will be stripped. By far the most widely used winding rules for polygon filling are EvenOdd and NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32) Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL) see http://glprogramming.com/red/chapter11.html OutRec: contains a path in the clipping solution. Edges in the AEL will carry a pointer to an OutRec when they are part of the clipping solution. Applies clipping from a clipping path to another path. Number of lines to use when transforming bezier curve to polyline. Generates the result of applying a clipping path to another path. Converts a path to a set of points for the Clipper algorithm to use. Allows duplicate points as they will be removed by Clipper. Extension class to Geometry. Return true if the points are in counter-clockwise order. The first point. The second point. The third point. Get the dot product of both points. The first point. The second point. Get a point with the summed coordinates of both points. The first point. The second point. Get a point with the substracted coordinates of both points. The first point. The second point. Algorithm to find a minimal bounding rectangle (MBR) such that the MBR corresponds to a rectangle with smallest possible area completely enclosing the polygon. From 'A Fast Algorithm for Generating a Minimal Bounding Rectangle' by Lennert D. Den Boer. Polygon P is assumed to be both simple and convex, and to contain no duplicate (coincident) vertices. The vertices of P are assumed to be in strict cyclic sequential order, either clockwise or counter-clockwise relative to the origin P0. Algorithm to find the (oriented) minimum area rectangle (MAR) by first finding the convex hull of the points and then finding its MAR. The points. Algorithm to find the oriented bounding box (OBB) by first fitting a line through the points to get the slope, then rotating the points to obtain the axis-aligned bounding box (AABB), and then rotating back the AABB. The points. Algorithm to find the convex hull of the set of points with time complexity O(n log n). Whether the point is located inside the rectangle. The rectangle that should contain the point. The point that should be contained within the rectangle. If set to false, will return false if the point belongs to the border. Whether the other rectangle is located inside the rectangle. The rectangle that should contain the other rectangle. The other rectangle that should be contained within the rectangle. If set to false, will return false if the rectangles share side(s). Whether two rectangles overlap. Returns false if the two rectangles only share a border. Gets the that is the intersection of two rectangles. Only works for axis-aligned rectangles. Gets the axis-aligned rectangle that completely containing the original rectangle, with no rotation. Whether the rectangle and the line intersect. Gets the that is the intersection of the rectangle and the line. Gets the list of s that are the intersection of the rectangle and the lines. Whether the point is located on the line segment. Whether two lines intersect. Whether two lines intersect. Get the that is the intersection of two lines. Get the that is the intersection of two lines. Checks if both lines are parallel. Checks if both lines are parallel. Gets the that is the intersection of the rectangle and the line. Whether the rectangle and the line intersect. Whether the point is located on the line segment. Whether two lines intersect. Whether two lines intersect. Get the that is the intersection of two lines. Get the that is the intersection of two lines. Checks if both lines are parallel. Checks if both lines are parallel. Whether the line formed by and intersects the line formed by and . The intersection of the line formed by and intersects the rectangle. Whether the line formed by and intersects the rectangle. Split a bezier curve into 2 bezier curves, at tau. The original bezier curve. The t value were to split the curve, usually between 0 and 1, but not necessary. Checks if the curve and the line are intersecting. Avoid using this method as it is not optimised. Use instead. Checks if the curve and the line are intersecting. Avoid using this method as it is not optimised. Use instead. Get the s that are the intersections of the line and the curve. Get the s that are the intersections of the line and the curve. Get the t values that are the intersections of the line and the curve. List of t values where the and the intersect. Get the t values that are the intersections of the line and the curve. List of t values where the and the intersect. nb: returns MaxInt ((2^32)-1) when pt is on a line Whether the point is located inside the subpath. Ignores winding rule. The subpath that should contain the point. The point that should be contained within the subpath. If set to false, will return false if the point belongs to the subpath's border. Whether the rectangle is located inside the subpath. Ignores winding rule. The subpath that should contain the rectangle. The rectangle that should be contained within the subpath. If set to false, will return false if the rectangle is on the subpath's border. Whether the other subpath is located inside the subpath. Ignores winding rule. The subpath that should contain the rectangle. The other subpath that should be contained within the subpath. If set to false, will return false if the other subpath is on the subpath's border. Get the area of the path. Whether the point is located inside the path. The path that should contain the point. The point that should be contained within the path. If set to false, will return false if the point belongs to the path's border. Whether the rectangle is located inside the path. The path that should contain the rectangle. The rectangle that should be contained within the path. If set to false, will return false if the rectangle is on the path's border. Whether the subpath is located inside the path. The path that should contain the subpath. The subpath that should be contained within the path. If set to false, will return false if the subpath is on the path's border. Whether the other path is located inside the path. The path that should contain the path. The other path that should be contained within the path. If set to false, will return false if the other subpath is on the path's border. Get the real roots of a Cubic (or Quadratic, a=0) equation. ax^3 + bx^2 + cx + d = 0 ax^3 bx^2 cx d By default user space units correspond to 1/72nd of an inch (a typographic point). The UserUnit entry in a page dictionary can define the space units as a different multiple of 1/72 (1 point). The number of points (1/72nd of an inch) corresponding to a single unit in user space. Create a new unit specification for a page. Encapsulates the algorithm for chromatic adaptation described here: http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html Transformer for CIEBased color spaces. In addition to the PDF spec itself, the transformation implementation is based on the descriptions in: https://en.wikipedia.org/wiki/SRGB#The_forward_transformation_(CIE_XYZ_to_sRGB) and http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html Transforms the supplied ABC color to the RGB color of the that was supplied to this as the destination workspace. A, B and C represent red, green and blue calibrated color values in the range 0 to 1. A color with cyan, magenta, yellow and black (K) components. CMYK Black value (0, 0, 0, 1). CMYK White value (all 0). The cyan value. The magenta value. The yellow value. The black value. Create a new . Equals. Not Equals. Color values in a PDF are interpreted according to the current color space. Color spaces enable a PDF to specify abstract colors in a device independent way. Grayscale. Controls the intensity of achromatic light on a scale from black to white. RGB. Controls the intensities of red, green and blue light. CMYK. Controls the concentrations of cyan, magenta, yellow and black (K) inks. CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. CalGray - Special case of the CIE colorspace using a single channel (A) and a single transformation. A represents the gray component of a calibrated gray space in the range 0 to 1. CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. CalRGB - A CIE ABC color space with a single transformation. A, B and C represent red, green and blue color values in the range 0 to 1. CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. Lab - A CIE ABC color space with two transforms. A, B and C represent the L*, a* and b* components of a CIE 1976 L*a*b* space. The range of A (L*) is 0 to 100. The range of B (a*) and C (b*) are defined by the Range of the color space. ICC (International Color Consortium) colorspace. ICC - Colorspace specified by a sequence of bytes which are interpreted according to the ICC specification. An Indexed color space allows a PDF content stream to use small integers as indices into a color map or color table of arbitrary colors in some other space. A PDF consumer application treats each sample value as an index into the color table and uses the color value it finds there. Enables a PDF content stream to paint an area with a pattern rather than a single color. The pattern may be either a tiling pattern (type 1) or a shading pattern (type 2). Provides a means for specifying the use of additional colorants or for isolating the control of individual color components of a device color space for a subtractive device. When such a space is the current color space, the current color is a single-component value, called a tint, that controls the application of the given colorant or color components only. Can contain an arbitrary number of color components. They provide greater flexibility than is possible with standard device color spaces such as or with individual color spaces. For example, it is possible to create a DeviceN color space consisting of only the cyan, magenta, and yellow color components, with the black component excluded. Contains more document-specific information about the . The type of the ColorSpace. The number of components for the color space. The underlying type of , usually equal to unless or . The number of components for the underlying color space. Create a new . Get the color. Get the color, without check and caching. Get the color that initialize the current stroking or nonstroking colour. Transform image bytes. Convert to byte. A grayscale value is represented by a single number in the range 0.0 to 1.0, where 0.0 corresponds to black, 1.0 to white, and intermediate values to different gray levels. The single instance of the . Color values are defined by three components representing the intensities of the additive primary colorants red, green and blue. Each component is specified by a number in the range 0.0 to 1.0, where 0.0 denotes the complete absence of a primary component and 1.0 denotes maximum intensity. The single instance of the . Color values are defined by four components cyan, magenta, yellow and black. The single instance of the . An Indexed color space allows a PDF content stream to use small integers as indices into a color map or color table of arbitrary colors in some other space. A PDF consumer treats each sample value as an index into the color table and uses the color value it finds there. Creates a indexed color space useful for extracting stencil masks as black-and-white images, i.e. with a color palette of two colors (black and white). If the decode parameter array is [0, 1] it indicates that black is at index 0 in the color palette, whereas [1, 0] indicates that the black color is at index 1. In the case of , gets the ' BaseNumberOfColorComponents. The base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or (in PDF 1.3) a Separation or DeviceN space, but not a Pattern space or another Indexed space. An integer that specifies the maximum valid index value. Can be no greater than 255. Provides the mapping between index values and the corresponding colors in the base color space. Create a new . Unwrap then transform using base color space details. DeviceN colour spaces may contain an arbitrary number of colour components. They provide greater flexibility than is possible with standard device colour spaces such as DeviceCMYK or with individual Separation colour spaces. The 'N' in DeviceN. Specifies name objects specifying the individual colour components. The length of the array shall determine the number of components in the DeviceN colour space. The component names shall all be different from one another, except for the name None, which may be repeated. The special name All, used by Separation colour spaces, shall not be used. If the colorant name associated with a DeviceN color space does not correspond to a colorant available on the device, the application arranges for subsequent painting operations to be performed in an alternate color space. The intended colors can be approximated by colors in a device or CIE-based color space which are then rendered with the usual primary or process colorants. The optional attributes parameter shall be a dictionary containing additional information about the components of colour space that conforming readers may use. Conforming readers need not use the alternateSpace and tintTransform parameters, and may instead use custom blending algorithms, along with other information provided in the attributes dictionary if present. During subsequent painting operations, an application calls this function to transform a tint value into color component values in the alternate color space. The function is called with the tint value and must return the corresponding color component values. That is, the number of components and the interpretation of their values depend on the . Create a new . DeviceN Color Space Attributes. A name specifying the preferred treatment for the colour space. Values shall be DeviceN or NChannel. Default value: DeviceN. Colorants - dictionary - Required if Subtype is NChannel and the colour space includes spot colorants; otherwise optional. Process - dictionary - Required if Subtype is NChannel and the colour space includes components of a process colour space, otherwise optional. MixingHints - dictionary - Optional Create a new . Create a new . A Separation color space provides a means for specifying the use of additional colorants or for isolating the control of individual color components of a device color space for a subtractive device. When such a space is the current color space, the current color is a single-component value, called a tint, that controls the application of the given colorant or color components only. Specifies the name of the colorant that this Separation color space is intended to represent. The special colorant name All refers collectively to all colorants available on an output device, including those for the standard process colorants. The special colorant name None never produces any visible output. Painting operations in a Separation space with this colorant name have no effect on the current page. If the colorant name associated with a Separation color space does not correspond to a colorant available on the device, the application arranges for subsequent painting operations to be performed in an alternate color space. The intended colors can be approximated by colors in a device or CIE-based color space which are then rendered with the usual primary or process colorants. During subsequent painting operations, an application calls this function to transform a tint value into color component values in the alternate color space. The function is called with the tint value and must return the corresponding color component values. That is, the number of components and the interpretation of their values depend on the . Create a new . CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. CalGray - A CIE A color space with a single transformation. A represents the gray component of a calibrated gray space. The component must be in the range 0.0 to 1.0. An array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse white point. The numbers XW and ZW shall be positive, and YW shall be equal to 1.0. An array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse black point. All three numbers must be non-negative. Default value: [0.0 0.0 0.0]. A number defining the gamma for the gray (A) component. Gamma must be positive and is generally greater than or equal to 1. Default value: 1. Create a new . Transforms the supplied A color to grayscale RGB (sRGB) using the propties of this in the transformation process. A represents the gray component of a calibrated gray space. The component must be in the range 0.0 to 1.0. CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. CalRGB - A CIE ABC color space with a single transformation. A, B and C represent red, green and blue color values in the range 0.0 to 1.0. An array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse white point. The numbers XW and ZW shall be positive, and YW shall be equal to 1.0. An array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse black point. All three numbers must be non-negative. Default value: [0.0 0.0 0.0]. An array of three numbers [GR GG GB] specifying the gamma for the red, green and blue (A, B, C) components of the color space. Default value: [1.0 1.0 1.0]. An array of nine numbers [XA YA ZA XB YB ZB XC YC ZC] specifying the linear interpretation of the decoded A, B, C components of the color space with respect to the final XYZ representation. Default value: [1 0 0 0 1 0 0 0 1]. Create a new . Transforms the supplied ABC color to RGB (sRGB) using the propties of this in the transformation process. A, B and C represent red, green and blue calibrated color values in the range 0.0 to 1.0. CIE (Commission Internationale de l'Éclairage) colorspace. Specifies color related to human visual perception with the aim of producing consistent color on different output devices. CalRGB - A CIE ABC color space with a single transformation. A, B and C represent red, green and blue color values in the range 0.0 to 1.0. An array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse white point. The numbers XW and ZW shall be positive, and YW shall be equal to 1.0. An array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space of the diffuse black point. All three numbers must be non-negative. Default value: [0.0 0.0 0.0]. An array of four numbers [a_min a_max b_min b_max] that shall specify the range of valid values for the a* and b* (B and C) components of the colour space — that is, a_min ≤ a* ≤ a_max and b_min ≤ b* ≤ b_max Component values falling outside the specified range shall be adjusted to the nearest valid value without error indication. Default value: [−100 100 −100 100]. Create a new . Transforms the supplied ABC color to RGB (sRGB) using the properties of this in the transformation process. A, B and C represent the L*, a*, and b* components of a CIE 1976 L*a*b* space. The range of the first (L*) component shall be 0 to 100; the ranges of the second and third (a* and b*) components shall be defined by the Range entry in the colour space dictionary The ICCBased color space is one of the CIE-based color spaces supported in PDFs. These color spaces enable a page description to specify color values in a way that is related to human visual perception. The goal is for the same color specification to produce consistent results on different output devices, within the limitations of each device. Currently support for this color space is limited in PdfPig. Calculations will only be based on the color space of . The number of color components in the color space described by the ICC profile data. This numbers shall match the number of components actually in the ICC profile. Valid values are 1, 3 and 4. An alternate color space that can be used in case the one specified in the stream data is not supported. Non-conforming readers may use this color space. The alternate color space may be any valid color space (except a Pattern color space). If this property isn't explicitly set during construction, it will assume one of the color spaces, DeviceGray, DeviceRGB or DeviceCMYK depending on whether the value of is 1, 3 or respectively. Conversion of the source color values should not be performed when using the alternate color space. Color values within the range of the ICCBased color space might not be within the range of the alternate color space. In this case, the nearest values within the range of the alternate space must be substituted. A list of 2 x numbers [min0 max0 min1 max1 ...] that specifies the minimum and maximum valid values of the corresponding color components. These values must match the information in the ICC profile. Default value: [0.0 1.0 0.0 1.0 ...]. An optional metadata stream that contains metadata for the color space. Create a new . Pattern color space. The pattern dictionary. Cannot be called for , will throw a . Valid for Uncoloured Tiling Patterns. Wwill throw a otherwise. The underlying color space for Uncoloured Tiling Patterns. Create a new . The patterns. The underlying colour space for Uncoloured Tiling Patterns. Get the corresponding . Cannot be called for , will throw a . Cannot be called for , will throw a . Use instead. Always returns null. Cannot be called for , will throw a . A ColorSpace which the PdfPig library does not currently support. Please raise a PR if you need support for this ColorSpace. The single instance of the . Cannot be called for , will throw a . Cannot be called for , will throw a . Provides utility extension methods for dealing with s. Gets the corresponding for a given . Maps from a to the corresponding if one exists. Includes extended color spaces. Gets the corresponding for a given . s can be classified into colorspace families. s within the same family share general characteristics. Device colorspaces directly specify colors or shades of gray that the output device should produce. CIE-based color spaces are based on an international standard for color specification created by the Commission Internationale de l'Éclairage (International Commission on Illumination) (CIE). These spaces specify colors in a way that is independent of the characteristics of any particular output device. Special color spaces add features or properties to an underlying color space. They include facilities for patterns, color mapping, separations, and high-fidelity and multitone color. A grayscale color with a single gray component. Gray Black value (0). Gray White value (1). The gray value between 0 and 1. Create a new . Equals. Not Equals. A color used for text or paths in a PDF. The colorspace used for this color. The color as RGB values (between 0 and 1). A pattern color. Base class for and . 1 for tiling, 2 for shading. The dictionary defining the pattern. Graphics state parameter dictionary containing graphics state parameters to be put into effect temporarily while the shading pattern is painted. Any parameters that are so specified shall be inherited from the graphics state that was in effect at the beginning of the content stream in which the pattern is defined as a resource. The pattern matrix (see 8.7.2, "General Properties of Patterns"). Default value: the identity matrix [1 0 0 1 0 0]. Cannot be called for , will throw a . A tiling pattern consists of a small graphical figure called a pattern cell. Painting with the pattern replicates the cell at fixed horizontal and vertical intervals to fill an area. The effect is as if the figure were painted on the surface of a clear glass tile, identical copies of which were then laid down in an array covering the area and trimmed to its boundaries. Content stream containing the painting operators needed to paint one instance of the cell. A code that determines how the colour of the pattern cell shall be specified. A code that controls adjustments to the spacing of tiles relative to the device pixel grid:. The pattern cell's bounding box. These boundaries shall be used to clip the pattern cell. The desired horizontal spacing between pattern cells, measured in the pattern coordinate system. XStep and YStep may differ from the dimensions of the pattern cell implied by the BBox entry. This allows tiling with irregularly shaped figures. XStep and YStep may be either positive or negative but shall not be zero. The desired vertical spacing between pattern cells, measured in the pattern coordinate system. XStep and YStep may differ from the dimensions of the pattern cell implied by the BBox entry. This allows tiling with irregularly shaped figures. XStep and YStep may be either positive or negative but shall not be zero. A resource dictionary that shall contain all of the named resources required by the pattern's content stream. Content containing the painting operators needed to paint one instance of the cell. Create a new . Equals. Not Equals. Shading patterns provide a smooth transition between colours across an area to be painted, independent of the resolution of any particular output device and without specifying the number of steps in the colour transition. A shading object defining the shading pattern's gradient fill. Create a new . Equals. Not Equals. TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO A color space definition from a resource dictionary. A color with red, green and blue components. RGB Black value (all 0). RGB White value (all 1). The red value between 0 and 1. The green value between 0 and 1. The blue value between 0 and 1. Create a new . The red value between 0 and 1. The green value between 0 and 1. The blue value between 0 and 1. Whether 2 RGB colors are equal across all channels. Equals. Not Equals. A shading specifies details of a particular gradient fill, including the type of shading to be used, the geometry of the area to be shaded, and the geometry of the gradient fill. Various shading types are available, depending on the value of the dictionary's ShadingType entry. The dictionary defining the shading. The shading type. The colour space in which colour values shall beexpressed. This may be any device, CIE-based, or special colour space except a Pattern space. An array of colour components appropriate to the colour space, specifying a single background colour value. If present, this colour shall be used, before any painting operation involving the shading, to fill those portions of the area to be painted that lie outside the bounds of the shading object. The shading's bounding box. The coordinates shall be interpreted in the shading's target coordinate space. If present, this bounding box shall be applied as a temporary clipping boundary when the shading is painted, in addition to the current clipping path and any other clipping boundaries in effect at that time. The shading operators sample shading functions at a rate determined by the resolution of the output device. Aliasing can occur if the function is not smooth—that is, if it has a high spatial frequency relative to the sampling rate. Anti-aliasing can be computationally expensive and is usually unnecessary, since most shading functions are smooth enough or are sampled at a high enough frequency to avoid aliasing effects. Anti-aliasing may not be implemented on some output devices, in which case this flag is ignored. Create a new . The shading's function(s), if any. Convert the input values using the functions of the shading. Function-based shadings (type 1) define the colour of every point in the domain using a mathematical function (not necessarily smooth or continuous). (Optional) An array of four numbers [xmin xmax ymin ymax] specifying the rectangular domain of coordinates over which the colour function(s) are defined. Default value: [0.0 1.0 0.0 1.0]. (Optional) An array of six numbers specifying a transformation matrix mapping the coordinate space specified by the Domain entry into the shading's target coordinate space. Default value: the identity matrix [1 0 0 1 0 0]. (Required) A 2-in, n-out function or an array of n 2-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). Each function's domain shall be a superset of that of the shading dictionary. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. Create a new . Axial shadings (type 2) define a colour blend along a line between two points, optionally extended beyond the boundary points by continuing the boundary colours. (Required) An array of four numbers [x0 y0 x1 y1] specifying the starting and ending coordinates of the axis, expressed in the shading's target coordinate space. (Optional) An array of two numbers [t0 t1] specifying the limiting values of a parametric variable t. The variable is considered to vary linearly between these two values as the colour gradient varies between the starting and ending points of the axis. The variable t becomes the input argument to the colour function(s). Default value: [0.0 1.0]. (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). The function(s) shall be called with values of the parametric variable t in the domain defined by the Domain entry. Each function's domain shall be a superset of that of the shading dictionary. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. (Optional) An array of two boolean values specifying whether to extend the shading beyond the starting and ending points of the axis, respectively. Default value: [false false]. Create a new . Radial shadings (type 3) define a blend between two circles, optionally extended beyond the boundary circles by continuing the boundary colours. This type of shading is commonly used to represent three-dimensional spheres and cones. (Required) An array of six numbers [x0 y0 r0 x1 y1 r1] specifying the centres and radii of the starting and ending circles, expressed in the shading's target coordinate space. The radii r0 and r1 shall both be greater than or equal to 0. If one radius is 0, the corresponding circle shall be treated as a point; if both are 0, nothing shall be painted. (Optional) An array of two numbers [t0 t1] specifying the limiting values of a parametric variable t. The variable is considered to vary linearly between these two values as the colour gradient varies between the starting and ending circles. The variable t becomes the input argument to the colour function(s). Default value: [0.0 1.0]. (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). The function(s) shall be called with values of the parametric variable t in the domain defined by the shading dictionary's Domain entry. Each function’s domain shall be a superset of that of the shading dictionary. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. (Optional) An array of two boolean values specifying whether to extend the shading beyond the starting and ending points of the axis, respectively. Default value: [false false]. Create a new . Free-form Gouraud-shaded triangle meshes (type 4) define a common construct used by many three-dimensional applications to represent complex coloured and shaded shapes. Vertices are specified in free-form geometry. (Required) The number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32. (Required) The number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16. (Required) The number of bits used to represent the edge flag for each vertex (see below). The value of BitsPerFlag shall be 2, 4, or8, but only the least significant 2 bits in each flag value shall beused. The value for the edge flag shall be 0, 1, or 2. (Required) An array of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values. The decoding method is similar to that used in image dictionaries. The ranges shall bespecified as follows: [xmin xmax ymin ymax c1, min c1, max … cn, min cn, max] Only one pair of c values shall be specified if a Function entry is present. (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). If this entry is present, the colour data for each vertex shall be specified by a single parametric variable rather than by n separate colour components. The designated function(s) shall be called with each interpolated value of the parametric variable to determine the actual colour at each point. Each input value shall be forced into the range interval specified for the corresponding colour component in the shading dictionary's Decode array. Each function’s domain shall be a superset of that interval. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. This entry shall not be used with an Indexed colour space. Create a new . Lattice-form Gouraud-shaded triangle meshes (type 5) are based on the same geometrical construct as type 4 but with vertices specified as a pseudorectangular lattice. (Required) The number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32. (Required) The number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16. (Required) The number of vertices in each row of the lattice; the value shall be greater than or equal to 2. The number of rows need not be specified. (Required) An array of numbers specifying how to map vertex coordinates and colour components into the appropriate ranges of values. The decoding method is similar to that used in image dictionaries. The ranges shall bespecified as follows: [xmin xmax ymin ymax c1, min c1, max … cn, min cn, max] Only one pair of c values shall be specified if a Function entry is present. (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). If this entry is present, the colour data for each vertex shall be specified by a single parametric variable rather than by n separate colour components. The designated function(s) shall be called with each interpolated value of the parametric variable to determine the actual colour at each point. Each input value shall be forced into the range interval specified for the corresponding colour component in the shading dictionary's Decode array. Each function's domain shall be a superset of that interval. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. This entry shall not be used with an Indexed colour space. Create a new . Coons patch meshes (type 6) construct a shading from one or more colour patches, each bounded by four cubic Bézier curves. (Required) The number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32. (Required) The number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16. (Required) The number of bits used to represent the edge flag for each patch (see below). The value shall be 2, 4, or 8, but only the least significant 2 bits in each flag value shall be used. Valid values for the edge flag shall be 0, 1, 2, and 3. (Required) An array of numbers specifying how to map coordinates and colour components into the appropriate ranges of values. The decoding method is similar to that used in image dictionaries. The ranges shall be specified as follows: [xmin xmax ymin ymax c1, min c1, max … cn, min cn, max] Only one pair of c values shall be specified if a Function entry is present. (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). If this entry is present, the colour data for each vertex shall be specified by a single parametric variable rather than by n separate colour components. The designated function(s) shall be called with each interpolated value of the parametric variable to determine the actual colour at each point. Each input value shall be forced into the range interval specified for the corresponding colour component in the shading dictionary's Decode array. Each function’s domain shall be a superset of that interval. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. This entry shall not be used with an Indexed colour space. Create a new . Tensor-product patch meshes (type 7) are similar to type 6 but with additional control points in each patch, affording greater control over colour mapping. (Required) The number of bits used to represent each vertex coordinate. The value shall be 1, 2, 4, 8, 12, 16, 24, or 32. (Required) The number of bits used to represent each colour component. The value shall be 1, 2, 4, 8, 12, or 16. (Required) The number of bits used to represent the edge flag for each patch (see below). The value shall be 2, 4, or 8, but only the least significant 2 bits in each flag value shall be used. Valid values for the edge flag shall be 0, 1, 2, and 3. (Required) An array of numbers specifying how to map coordinates and colour components into the appropriate ranges of values. The decoding method is similar to that used in image dictionaries. The ranges shall be specified as follows: [xmin xmax ymin ymax c1, min c1, max … cn, min cn, max] Only one pair of c values shall be specified if a Function entry is present. (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n is the number of colour components in the shading dictionary's colour space). If this entry is present, the colour data for each vertex shall be specified by a single parametric variable rather than by n separate colour components. The designated function(s) shall be called with each interpolated value of the parametric variable to determine the actual colour at each point. Each input value shall be forced into the range interval specified for the corresponding colour component in the shading dictionary's Decode array. Each function’s domain shall be a superset of that interval. If the value returned by the function for a given colour component is out of range, it shall be adjusted to the nearest valid value. This entry shall not be used with an Indexed colour space. Create a new . Shading types. Function-based shading. Axial shading. Radial shading. Free-form Gouraud-shaded triangle mesh. Lattice-form Gouraud-shaded triangle mesh. Coons patch mesh. Tensor-product patch mesh Stores each letter as it is encountered in the content stream. Stores each path as it is encountered in the content stream. Stores a link to each image (either inline or XObject) as it is encountered in the content stream. Stores each marked content as it is encountered in the content stream. A counter to track individual calls to operations used to determine if letters are likely to be in the same word/group. This exposes internal grouping of letters used by the PDF creator which may correspond to the intended grouping of letters into words. The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked. The stroke is squared off at the endpoint of the path. There is no projection beyond the end of the path. A semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in. The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off. The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The distance into the dash pattern at which to start the dash. The numbers that specify the lengths of alternating dashes and gaps. Create a new . The phase. . The array. . The default solid line. The line join style specifies the shape to be used at the corners of paths that are stroked. The outer edges of the strokes for the two segments are extended until they meet at an angle, as in a picture frame. If the segments meet at too sharp an angle (as defined by the miter limit parameter), a bevel join is used instead. An arc of a circle with a diameter equal to the line width is drawn around the point where the two segments meet, connecting the outer edges of the strokes for the two segments The two segments are finished with butt caps and the resulting notch beyond the ends of the segments is filled with a triangle. Specifying a rendering intent allows a PDF file to set priorities regarding which properties to preserve and which to sacrifice for CIE colors. No correction for the output medium's white point. Colors only represented relative to the light source. Combines light source and output medium's white point. Emphasises saturation rather than colorimetric accuracy. Modifies from colorimetric values to provide a "pleasing perceptual appearance". The current state of text related parameters for a content stream. Whether the font comes from the extended graphics state via the operator. A value in unscaled text space units which is added to the horizontal (or vertical if in vertical writing mode) glyph displacement. In horizontal writing mode a positive value will expand the distance between letters/glyphs. Default value 0. As for but applies only for the space character (32). Default value 0. Adjusts the width of glyphs/letters by stretching (or compressing) them horizontally. Value is a percentage of the normal width. The vertical distance in unscaled text space units between the baselines of lines of text. The name of the currently active font. The current font size. The for glyph outlines. When the rendering mode requires filling the current non-stroking color in the state is used.
When the rendering mode requires stroking the current stroking color in the state is used.
The rendering mode has no impact on Type 3 fonts.
The distance in unscaled text space units to move the default baseline either up or down. Always applies to the vertical coordinate irrespective or writing mode. Are all glyphs in a text object treated as a single elementary object for the purpose of the transparent imaging model? The state of the current graphics control parameters set by operations in the content stream. Initialized per page. The current clipping path. The for this graphics state. Thickness in user space units of path to be stroked. Specifies the shape of line ends for open stroked paths. Specifies the shape of joins between connected stroked path segments. Maximum length of mitered line joins for paths before becoming a bevel. The pattern to be used for stroked lines. The rendering intent to use when converting CIE-based colors to device colors. Should a correction for rasterization effects be applied? Opacity value to be used for transparent imaging. Opacity value to be used for transparent imaging. Should soft mask and alpha constant values be interpreted as shape () or opacity () values? Maps positions from user coordinates to device coordinates. The active colorspaces for this content stream. The current active stroking color for paths. The current active non-stroking color for text and fill. Should painting in a colorant set erase () or leave unchanged () areas of other colorant sets? As for but with non-stroking operations. In DeviceCMYK color space a value of 0 for a component will erase a component (0) or leave it unchanged (1) for overprinting. The precision for rendering curves, smaller numbers give smoother curves. The precision for rendering color gradients on the output device. Methods for manipulating and retrieving the current color state for a PDF content stream. The used for stroking operations. The used for non-stroking operations. Set the current color space to use for stroking operations and initialize the stroking color. The color space name. The color space dictionary. Default value is null. Set the current color space to use for nonstroking operations and initialize the nonstroking color. The color space name. The color space dictionary. Default value is null. Set the color to use for stroking operations using the current color space. Set the stroking color space to DeviceGray and set the gray level to use for stroking operations. A number between 0.0 (black) and 1.0 (white). Set the stroking color space to DeviceRGB and set the color to use for stroking operations. Red - A number between 0 (minimum intensity) and 1 (maximum intensity). Green - A number between 0 (minimum intensity) and 1 (maximum intensity). Blue - A number between 0 (minimum intensity) and 1 (maximum intensity). Set the stroking color space to DeviceCMYK and set the color to use for stroking operations. Cyan - A number between 0 (minimum concentration) and 1 (maximum concentration). Magenta - A number between 0 (minimum concentration) and 1 (maximum concentration). Yellow - A number between 0 (minimum concentration) and 1 (maximum concentration). Black - A number between 0 (minimum concentration) and 1 (maximum concentration). Set the color to use for nonstroking operations using the current color space. Set the nonstroking color space to DeviceGray and set the gray level to use for nonstroking operations. A number between 0.0 (black) and 1.0 (white). Set the nonstroking color space to DeviceRGB and set the color to use for nonstroking operations. Red - A number between 0 (minimum intensity) and 1 (maximum intensity). Green - A number between 0 (minimum intensity) and 1 (maximum intensity). Blue - A number between 0 (minimum intensity) and 1 (maximum intensity). Set the nonstroking color space to DeviceCMYK and set the color to use for nonstroking operations. Cyan - A number between 0 (minimum concentration) and 1 (maximum concentration). Magenta - A number between 0 (minimum concentration) and 1 (maximum concentration). Yellow - A number between 0 (minimum concentration) and 1 (maximum concentration). Black - A number between 0 (minimum concentration) and 1 (maximum concentration). The current graphics state context when running a PDF content stream. The current position. The matrices for the current text state. The number of graphics states on the stack. Gets the current graphic state. Sets the current graphics state to the state from the top of the stack. Saves a copy of the current graphics state on the stack. Shows the text represented by the provided bytes using the current graphics state. The bytes of the text. Interprets the tokens to draw text at positions. The tokens to show. Retrieves the named XObject and applies it to the current state. The name of the XObject. Start a new sub-path. Close the current subpath. Stroke the current path. Whether to also close the path. Fill the current path. The filling rule to use. Whether to also close the path. Fill and stroke the current path. The filling rule to use. Whether to also close the path. Add a move command to the path. Should implement matrix transformations. Add a bezier curve to the current subpath. Should implement matrix transformations. Add a bezier curve to the current subpath. Should implement matrix transformations. Add a line command to the subpath. Should implement matrix transformations. Add a rectangle following the pdf specification (m, l, l, l, c) path. A new subpath will be created. Should implement matrix transformations. End the path object without filling or stroking it. This operator shall be a path-painting no-op, used primarily for the side effect of changing the current clipping path (see 8.5.4, "Clipping Path Operators"). Close the current path. Indicate that a marked content region is started. Indicates that the current marked content region is complete. Update the graphics state to apply the state from the named ExtGState dictionary. The name of the state to apply. Indicate that an inline image is being defined. Define the properties of the inline image currently being drawn. Indicates that the current inline image is complete. Modify the clipping rule of the current path. Set the flatness tolerance in the graphics state. Flatness is a number in the range 0 to 100; a value of 0 specifies the output device’s default flatness tolerance. Set the line cap style in the graphics state. Set the line dash pattern in the graphics state. Set the line join style in the graphics state. Set the line width in the graphics state. Set the miter limit in the graphics state. Move to the start of the next line. This performs this operation: 0 -Tl Td The offset is negative leading text (Tl) value, this is incorrect in the specification. Set the font and the font size. Font is the name of a font resource in the Font subdictionary of the current resource dictionary. Size is a number representing a scale factor. Set the horizontal scaling. Set the text leading. Set the text rendering mode. Set text rise. Sets the word spacing. Modify the current transformation matrix by concatenating the specified matrix. Set the character spacing to a number expressed in unscaled text space units. Initial value: 0. Paint the shape and colour shading described by a shading dictionary, subject to the current clipping path. The current colour in the graphics state is neither used nor altered. The effect is different from that of painting a path using a shading pattern as the current colour. The name of a shading dictionary resource in the Shading subdictionary of the current resource dictionary. Handles building s. Modify the current clipping path by intersecting it with the current path, using the even-odd rule to determine which regions lie inside the clipping path. The symbol for this operation in a stream. The instance of the operation. Modify the current clipping path by intersecting it with the current path, using the nonzero winding number rule to determine which regions lie inside the clipping path. The symbol for this operation in a stream. The instance of the operation. Begin a compatibility section. Unrecognized operators (along with their operands) are ignored without error. The symbol for this operation in a stream. The instance of the operation. End a compatibility section. The symbol for this operation in a stream. The instance of the operation. Set the color rendering intent in the graphics state. The symbol for this operation in a stream. The rendering intent for CIE-based colors. Create new . The rendering intent. Set the flatness tolerance in the graphics state. Flatness is a number in the range 0 to 100; a value of 0 specifies the output device’s default flatness tolerance. The symbol for this operation in a stream. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments. Create new . The flatness tolerance. Set the line cap style in the graphics state. The symbol for this operation in a stream. The cap style. Create a new . Create a new . Set the line dash pattern in the graphics state. The symbol for this operation in a stream. The line dash pattern. Create a new . The symbol for this operation in a stream. The line join style. Create a new . Create a new . Set the line width in the graphics state. The symbol for this operation in a stream. The line width. Create a new . The line width. Set the miter limit in the graphics state. The symbol for this operation in a stream. The miter limit. The miter limit imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel. Create a new . An operation with associated data from a content stream. The symbol representing the operator in the content stream. Writes the operator and any operands as valid PDF content to the stream. The stream to write to. Applies the operation to the current context with the provided resources. Matrix transformations should be implemented in . Begin an inline image object. The symbol for this operation in a stream. The instance of the operation. Begin the image data for an inline image object. The symbol for this operation in a stream. The key-value pairs which specify attributes of the following image. Create a new . End an inline image object. The symbol for this operation in a stream. The raw data for the inline image which should be interpreted according to the corresponding . Create a new operation. The raw byte data of this image. Paint the specified XObject. The operand name must appear as a key in the XObject subdictionary of the current resource dictionary. The associated value must be a stream whose Type entry, if present, is XObject. The effect of depends on the value of the XObject's Subtype entry, which may be Image, Form or PS. The symbol for this operation in a stream. The name of the XObject which appears in the XObject subdictionary of the current resource dictionary. Create a new . The name of the XObject. Begin a marked-content sequence terminated by a balancing operator. The symbol for this operation in a stream. A name indicating the role or significance of the sequence. Create a new . The name of the marked-content sequence. Begin a marked-content sequence with an associated property list terminated by a balancing operator. The symbol for this operation in a stream. A name indicating the role or significance of the point. The name of the property dictionary in the Properties subdictionary of the current resource dictionary. Can be if the property dictionary is provided inline. The marked-content sequence properties. Can be if a name of the property dictionary is provided instead. Create a new . The name of the marked-content point. The name of the property dictionary. Create a new . The name of the marked-content point. The properties of the marked-content point. Designate a single marked-content point in the content stream. The symbol for this operation in a stream. A name indicating the role or significance of the point. Create a new . The name of the marked-content point. Designate a single marked-content point in the content stream with an associated property list. The symbol for this operation in a stream. A name indicating the role or significance of the point. The name of the property dictionary in the Properties subdictionary of the current resource dictionary. Can be if the property dictionary is provided inline. The marked-content point properties. Can be if a name of the property dictionary is provided instead. Create a new . The name of the marked-content point. The name of the property dictionary. Create a new . The name of the marked-content point. The properties of the marked-content point. End a marked-content sequence. The symbol for this operation in a stream. The instance of the operation. Paint the shape and color shading described by a shading dictionary, subject to the current clipping path. The current color in the graphics state is neither used nor altered. The effect is different from that of painting a path using a shading pattern as the current color. The symbol for this operation in a stream. The name of a shading dictionary resource in the Shading subdictionary of the current resource dictionary. Create a new . The name of the shading dictionary. Append a cubic Bezier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points The symbol for this operation in a stream. First control point x. First control point y. Second control point x. Second control point y. End point x. End point y. Create a new . Control point 1 x coordinate. Control point 1 y coordinate. Control point 2 x coordinate. Control point 2 y coordinate. End point x coordinate. End point y coordinate. Append a cubic Bezier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bezier control points The symbol for this operation in a stream. The x coordinate of the first control point. The y coordinate of the first control point. The x coordinate of the end point. The y coordinate of the end point. Create a new . Control point 1 x coordinate. Control point 1 y coordinate. Control point 2/End x coordinate. Control point 2/End y coordinate. Append a rectangle to the current path as a complete subpath. The symbol for this operation in a stream. The x coordinate of the lower left corner. The y coordinate of the lower left corner. The width of the rectangle. The height of the rectangle. Create a new . The x coordinate of the lower left corner. The y coordinate of the lower left corner. The width of the rectangle. The height of the rectangle. Append a cubic Bezier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bezier control points The symbol for this operation in a stream. The x coordinate of the second control point. The y coordinate of the second control point. The x coordinate of the end point of the curve. The y coordinate of the end point of the curve. Create a new . The x coordinate of the second control point. The y coordinate of the second control point. The x coordinate of the end point. The y coordinate of the end point. Append a straight line segment from the current point to the point (x, y). The symbol for this operation in a stream. The x coordinate of the end point of the line. The y coordinate of the end point of the line. Create a new . The x coordinate of the line's end point. The y coordinate of the line's end point. Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment. The symbol for this operation in a stream. The x coordinate for the subpath to begin at. The y coordinate for the subpath to begin at. Create a new . The x coordinate. The y coordinate. Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath. If the current subpath is already closed, this does nothing. The symbol for this operation in a stream. The instance of the operation. Close and stroke the path. The symbol for this operation in a stream. The instance of the operation. Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill. The symbol for this operation in a stream. The instance of the operation. Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill. The symbol for this operation in a stream. The instance of the operation. End path without filling or stroking. The symbol for this operation in a stream. The instance of the operation. Fill the path, using the even-odd rule to determine the region to fill. The symbol for this operation in a stream. The instance of the operation. Fill and then stroke the path, using the even-odd rule to determine the region to fill. The symbol for this operation in a stream. The instance of the operation. Fill the path, using the nonzero winding number rule to determine the region to fill. Any subpaths that are open are implicitly closed before being filled. The symbol for this operation in a stream. The instance of the operation. Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill. The symbol for this operation in a stream. The instance of the operation. Equivalent to included only for compatibility. Although PDF consumer applications must be able to accept this operator, PDF producer applications should use instead. The symbol for this operation in a stream. The instance of the operation. Stroke the path. The symbol for this operation in a stream. The instance of the operation. Set the nonstroking color based on the current color space. The symbol for this operation in a stream. The values for the color, 1 for grayscale, 3 for RGB, 4 for CMYK. Create a new . The color operands. Set the stroking color based on the current color space with support for Pattern, Separation, DeviceN, and ICCBased color spaces. The symbol for this operation in a stream. The values for the color. The name of an entry in the Pattern subdictionary of the current resource dictionary. Create a new . The color operands. Create a new . The color operands. The pattern name. Set the non-stroking color space to DeviceCMYK and set the color to use for stroking operations. The symbol for this operation in a stream. The cyan level between 0 and 1. The magenta level between 0 and 1. The yellow level between 0 and 1. The key level between 0 and 1. Create a new . The cyan level. The magenta level. The yellow level. The key level. Set the gray level for non-stroking operations. The symbol for this operation in a stream. The gray level between 0 (black) and 1 (white). Create a new . The gray level. Set RGB color for non-stroking operations. The symbol for this operation in a stream. The red level between 0 and 1. The green level between 0 and 1. The blue level between 0 and 1. Create a new . The red level. The green level. The blue level. Set the current color space to use for nonstroking operations. The symbol for this operation in a stream. The name of the color space. Create a new . The name of the color space. Set the stroking color based on the current color space. The symbol for this operation in a stream. The values for the color, 1 for grayscale, 3 for RGB, 4 for CMYK. Create a new . The color operands. Set the stroking color based on the current color space with support for Pattern, Separation, DeviceN, and ICCBased color spaces. The symbol for this operation in a stream. The values for the color. The name of an entry in the Pattern subdictionary of the current resource dictionary. Create a new . The color operands. Create a new . The color operands. The pattern name. Set the stroking color space to DeviceCMYK and set the color to use for stroking operations. The symbol for this operation in a stream. The cyan level between 0 and 1. The magenta level between 0 and 1. The yellow level between 0 and 1. The key level between 0 and 1. Create a new . The cyan level. The magenta level. The yellow level. The key level. Set the gray level for stroking operations. The symbol for this operation in a stream. The gray level between 0 (black) and 1 (white). Create a new . The gray level. Set RGB color for stroking operations. The symbol for this operation in a stream. The red level between 0 and 1. The green level between 0 and 1. The blue level between 0 and 1. Create a new . The red level. The green level. The blue level. Set the current color space to use for stroking operations. The symbol for this operation in a stream. The name of the color space. Create a new . The name of the color space. Modify the current transformation matrix by concatenating the specified matrix. The symbol for this operation in a stream. The 6 values for the transformation matrix. Create a new . The 6 transformation matrix values. Restore the graphics state by removing the most recently saved state from the stack and making it the current state. The symbol for this operation in a stream. The instance of the operation. Save the current graphics state on the graphics state stack. The symbol for this operation in a stream. The instance of the operation. Set the specified parameters in the graphics state using the ExtGState subdictionary with the given name. The symbol for this operation in a stream. The name of a graphics state parameter dictionary in the ExtGState subdictionary of the current resource dictionary. Create a new . The name of the ExtGState dictionary. Begin a text object, initializing the text matrix and the text line matrix to the identity matrix. Text objects cannot be nested. The symbol for this operation in a stream. The instance of the operation. End a text object, discarding the text matrix. The symbol for this operation in a stream. The instance of the operation. Move to the start of the next line. This performs this operation: 0 -Tl Td The offset is negative leading text (Tl) value, this is incorrect in the specification. The symbol for this operation in a stream. The instance of the operation. Move to the start of the next line offset by Tx Ty. Performs the following operation: 1 0 0
Tm = Tlm = 0 1 0 * Tlm
tx ty 1
The symbol for this operation in a stream. The x value of the offset. The y value of the offset. Create a new . The x offset. The y offset. Move to the start of the next line, offset from the start of the current line by (tx, ty). This operator also sets the leading parameter in the text state. The symbol for this operation in a stream. The x value of the offset. The y value of the offset and the inverse of the leading parameter. Create a new . The x value of the offset. The y value of the offset and the inverse of the leading parameter. Set the text matrix and the text line matrix. The symbol for this operation in a stream. The values of the text matrix. Create a new . The values of the text matrix. Move to the next line and show a text string. The symbol for this operation in a stream. The text to show as a . The text to show as hex bytes. Create a new . The text to show. Create a new . The bytes of the text to show. Move to the next line and show a text string, using the first number as the word spacing and the second as the character spacing. The symbol for this operation in a stream. The word spacing. The character spacing. The bytes of the text. The text to show. Create a new . The word spacing. The character spacing. The text to show. Create a new . The word spacing. The character spacing. The bytes of the text to show. Show a text string The input is a sequence of character codes to be shown as glyphs. Generally each byte represents a single character code, however starting in version 1.2+ a composite font might use multi-byte character codes to map to glyphs. For these composite fonts, the of the font defines the mapping from code to glyph. The grouping of character codes in arguments to this operator does not have any impact on the meaning; for example:
(Abc) Tj is equivalent to (A) Tj (b) Tj (c) Tj
However grouping character codes makes the document easier to search and extract text from.
The symbol for this operation in a stream. The text string to show. The bytes of the string to show. Create a new . Create a new . Show one or more text strings, allowing individual glyph positioning. Each element of array can be a string or a number. If the element is a string, this operator shows the string. If it is a number, the operator adjusts the text position by that amount The symbol for this operation in a stream. The array elements. Create a new . The array elements. Set the character spacing to a number expressed in unscaled text space units. Initial value: 0. The symbol for this operation in a stream. The character spacing. Create a new . The character spacing. Set the font and the font size. Font is the name of a font resource in the Font subdictionary of the current resource dictionary. Size is a number representing a scale factor. The symbol for this operation in a stream. The name of the font as defined in the resource dictionary. The font program defines glyphs for a standard size. This standard size is set so that each line of text will occupy 1 unit in user space. The size is the scale factor used to scale glyphs from the standard size to the display size rather than the font size in points. Create a new . The font name. The font size. The symbol for this operation in a stream. A number specifying the percentage of the normal width. Create a new . The horizontal scaling percentage. Set the text leading. The symbol for this operation in a stream. The text leading in unscaled text space units. Create a new . The text leading. Set the text rendering mode. The symbol for this operation in a stream. The text rendering mode to set. Create a new . Create a new . Set text rise. The symbol for this operation in a stream. The amount of text rise - how far to move the baseline up or down from its default location. Create a new . The text rise. Sets the word spacing. The symbol for this operation in a stream. Sets the width of the space ' ' character. For horizontal writing positive values increase the gap between words separated by space, for vertical writing positive values decrease the gap. Create a new . The word spacing. Set width information for the glyph and declare that the glyph description specifies both its shape and its color for a Type 3 font. wx specifies the horizontal displacement in the glyph coordinate system; it must be consistent with the corresponding width in the font's Widths array. wy must be 0. The symbol for this operation in a stream. The horizontal displacement in the glyph coordinate system. The vertical displacement in the glyph coordinate system. Must be 0. Create a new . The horizontal displacement in the glyph coordinate system. The vertical displacement in the glyph coordinate system. Set width information for the glyph and declare that the glyph description specifies both its shape and its color for a Type 3 font. Also sets the glyph bounding box. The symbol for this operation in a stream. The horizontal displacement in the glyph coordinate system. The vertical displacement in the glyph coordinate system. Must be 0. The lower left x coordinate of the glyph bounding box. The lower left y coordinate of the glyph bounding box. The upper right x coordinate of the glyph bounding box. The upper right y coordinate of the glyph bounding box. Create a new . The horizontal displacement in the glyph coordinate system. The vertical displacement in the glyph coordinate system. The lower left x coordinate of the glyph bounding box. The lower left y coordinate of the glyph bounding box. The upper right x coordinate of the glyph bounding box. The upper right y coordinate of the glyph bounding box. A path is made up of one or more disconnected subpaths, each comprising a sequence of connected segments. The topology of the path is unrestricted: it may be concave or convex, may contain multiple subpaths representing disjoint areas, and may intersect itself in arbitrary ways. A path shall be composed of straight and curved line segments, which may connect to one another or may be disconnected. Rules for determining which points lie inside/outside the path. Returns true if this is a clipping path. Returns true if the path is filled. The fill color. Returns true if the path is stroked. The stroke color. Thickness in user space units of path to be stroked. The pattern to be used for stroked lines. The cap style to be used for stroked lines. The join style to be used for stroked lines. Set the clipping mode for this path and IsClipping to true. IsFilled and IsStroked flags will be set to false. Set the filling rule for this path and IsFilled to true. Set IsStroked to true. Create a clone with no Subpaths. Gets a which entirely contains the geometry of the defined path. For paths which don't define any geometry this returns . Manages the Text Matrix (Tm), Text line matrix (Tlm) and used to generate the Text Rendering Matrix (Trm). The current text matrix (Tm). Captures the value of the at the beginning of a line of text. This is convenient for aligning evenly spaced lines of text. An XObject content record. The XObject type. The XObject stream. The applied transformation. The default rendering intent. The default color space. Utility for working with the bytes in s and converting according to their .s Converts the output bytes (if available) of to actual pixel values using the . For most images this doesn't change the data but for it will convert the bytes which are indexes into the real pixel data into the real pixel data. Information read from a JPEG image. Width of the image in pixels. Height of the image in pixels. Bits per component. Create a new . Indicates that this is a baseline DCT-based JPEG, and specifies the width, height, number of components, and component subsampling. Indicates that this is a progressive DCT-based JPEG, and specifies the width, height, number of components, and component subsampling. Specifies one or more Huffman tables. Begins a top-to-bottom scan of the image. In baseline images, there is generally a single scan. Progressive images usually contain multiple scans. Specifies one or more quantization tables. Specifies the interval between RSTn markers, in Minimum Coded Units (MCUs). This marker is followed by two bytes indicating the fixed size so it can be treated like any other variable size segment. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Inserted every r macroblocks. Marks the start of a JPEG image file. Marks the end of a JPEG image file. Marks a text comment. For a given pass number (1 indexed) the scanline indexes of the lines included in that pass in the 8x8 grid. Used to calculate the Adler-32 checksum used for ZLIB data in accordance with RFC 1950: ZLIB Compressed Data Format Specification. Calculate the Adler-32 checksum for some data. The header for a data chunk in a PNG file. The position/start of the chunk header within the stream. The length of the chunk in bytes. The name of the chunk, uppercase first letter means the chunk is critical (vs. ancillary). Whether the chunk is critical (must be read by all readers) or ancillary (may be ignored). A public chunk is one that is defined in the International Standard or is registered in the list of public chunk types maintained by the Registration Authority. Applications can also define private (unregistered) chunk types for their own purposes. Whether the (if unrecognized) chunk is safe to copy. Create a new . Describes the interpretation of the image data. Grayscale. Colors are stored in a palette rather than directly in the data. The image uses color. The image has an alpha channel. The method used to compress the image data. Deflate/inflate compression with a sliding window of at most 32768 bytes. 32-bit Cyclic Redundancy Code used by the PNG for checking the data is intact. Calculate the CRC32 for data. Calculate the CRC32 for data. Calculate the combined CRC32 for data. Computes a simple linear function of the three neighboring pixels (left, above, upper left), then chooses as predictor the neighboring pixel closest to the computed value. Indicates the pre-processing method applied to the image data before compression. Adaptive filtering with five basic filter types. The raw byte is unaltered. The byte to the left. The byte above. The mean of bytes left and above, rounded down. Byte to the left, above or top-left based on Paeth's algorithm. Enables execution of custom logic whenever a chunk is read. Called by the PNG reader after a chunk is read. The high level information about the image. The width of the image in pixels. The height of the image in pixels. The bit depth of the image. The color type of the image. The compression method used for the image. The filter method used for the image. The interlace method used by the image.. Create a new . Indicates the transmission order of the image data. No interlace. Adam7 interlace. Creates a palette object. Input palette data length from PLTE chunk must be a multiple of 3. Adds transparency values from tRNS chunk. A pixel in a image. The red value for the pixel. The green value for the pixel. The blue value for the pixel. The alpha transparency value for the pixel. Whether the pixel is grayscale (if , and will all have the same value). Create a new . The red value for the pixel. The green value for the pixel. The blue value for the pixel. The alpha transparency value for the pixel. Whether the pixel is grayscale. Create a new which has false and is fully opaque. The red value for the pixel. The green value for the pixel. The blue value for the pixel. Create a new grayscale . The grayscale value. Whether the pixel values are equal. The other pixel. if all pixel values are equal otherwise . A PNG image. Call to open from file or bytes. The header data from the PNG image. The width of the image in pixels. The height of the image in pixels. Whether the image has an alpha (transparency) layer. Get the pixel at the given column and row (x, y). Pixel values are generated on demand from the underlying data to prevent holding many items in memory at once, so consumers should cache values if they're going to be looped over many time. The x coordinate (column). The y coordinate (row). The pixel at the coordinate. Read the PNG image from the stream. The stream containing PNG data to be read. Optional: A visitor which is called whenever a chunk is read by the library. The data from the stream. Read the PNG image from the bytes. The bytes of the PNG data to be read. Optional: A visitor which is called whenever a chunk is read by the library. The data from the bytes. Read the PNG from the file path. The path to the PNG file to open. Optional: A visitor which is called whenever a chunk is read by the library. This will open the file to obtain a so will lock the file during reading. The data from the file. Used to construct PNG images. Call to make a new builder. Create a builder for a PNG with the given width and size. Sets the RGB pixel value for the given column (x) and row (y). Set the pixel value for the given column (x) and row (y). Get the bytes of the PNG file for this builder. Write the PNG file bytes to the provided stream. The code to execute whenever a chunk is read. Can be . Whether to throw if the image contains data after the image end marker. by default. Provides convenience methods for indexing into a raw byte array to extract pixel values. Create a new . The decoded pixel data as bytes. The number of bytes in each pixel. The palette for the image. The image header. but without being a public API/ Default constructor. Default constructor. Create a random access buffer using the given byte array. @param input the byte array to be read Create a random access buffer of the given input stream by copying the data. @param input the input stream to be read @throws IOException if something went wrong while copying the data {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} create a new buffer chunk and adjust all pointers and indices. switch to the next buffer chunk and reset the buffer pointer. Ensure that the RandomAccessBuffer is not closed @throws IOException {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} {@inheritDoc} Logs internal messages from the PDF parsing process. Consumers can provide their own implementation in the to intercept log messages. Record an informational debug message. Record an informational debug message with exception. Record an warning message due to a non-error issue encountered in parsing. Record an error message due to an issue encountered in parsing. Record an error message due to an issue encountered in parsing with exception. A node in the (also known as outlines) of a PDF document. The text displayed for this node. The bookmark's sub-bookmarks. Whether this node is a leaf node (has no children). The node's level in the hierarchy. Create a new . The bookmarks in a PDF document. The roots of the bookmarks' node tree. Create a new . Get all nodes. Extract bookmarks, if any. Extract bookmarks recursively. Get explicit destination or a named destination (Ref 12.3.2.3) from dictionary Token name, can be D or Dest in case we are looking up a destination for a GoToR (Go To Remote) action: pass in true to enforce a check for indirect page references (which is not allowed for GoToR) A destination location in the same file. The page number (1-based) of the destination. The display type of the destination. The display coordinates of the destination. Create a new . The coordinates of the region to display for a . An empty set of coordinates where no values have been set. The left side of the region to display. The top edge of the region to display. The right side of the region to display The bottom edge of the region to display. Create a new . Create a new . Create a new . The display type for opening an . Display the page with the given top left coordinates and zoom level. Fit the entire page within the window. Fit the entire page width within the window. Fit the entire page height within the window. Fit the rectangle specified by the within the window. Fit the page's bounding box within the window. Fit the page's bounding box width within the window. Fit the page's bounding box height within the window. Named destinations in a PDF document Dictionary containing explicit destinations, keyed by name Pages are required for getting explicit destinations Constructor A node in the of a PDF document which corresponds to a location in the current document. The page number where the bookmark is located. The destination of the bookmark in the current document. Create a new . A node in the of a PDF document which corresponds to a location in an embedded file. The file specification for the embedded file Create a new . A node in the of a PDF document which corresponds to a location in an external file. The name of the file containing this bookmark. Create a new . A node in the of a PDF document which corresponds to a uniform resource identifier on the Internet. The uniform resource identifier to resolve. Create a new . Parse the dictionary from a PDF file trailer. Convert the file trailer dictionary into a instance. Check that the offsets in the cross reference are correct. Used to retrieve the version header from the PDF file. The first line of a PDF file should be a header consisting of the 5 characters %PDF– followed by a version number of the form 1.N, where N is a digit between 0 and 7. A conforming reader should accept files with any of the following headers: %PDF–1.0 %PDF–1.1 %PDF–1.2 %PDF–1.3 %PDF–1.4 %PDF–1.5 %PDF–1.6 %PDF–1.7 This parser allows versions up to 1.9. For versions equal or greater to PDF 1.4, the optional Version entry in the document's catalog dictionary should be used instead of the header version. The %%EOF may be further back in the file. For objects which provide document scoped caching. Brute force search for all objects in the document. Find the offset of every object contained in the document by searching the entire document contents. The bytes of the document. The object keys and offsets for the objects in this document. The array representing the size of the fields in a cross reference stream. The type of the entry. Type 0 and 2 is the object number, Type 1 this is the byte offset from beginning of file. For types 0 and 1 this is the generation number. For type 2 it is the stream index. How many bytes are in a line. Parses through the unfiltered stream and populates the xrefTable HashMap. Each subsection of the cross-reference table starts with a line defining the starting object number and the count of objects in the subsection. xref 12 16 ... Defines a table subsection that starts with object 12 and has 16 entries (12-27). The first object number in the table. The number of consecutive objects declared in the table. Create a new to define a range of consecutive objects in the cross-reference table. Attempts to read the from the current line of the source. Configures options used by the parser when reading PDF documents. A default with set to false. Should the parser apply clipping to paths? Defaults to . Bezier curves will be transformed into polylines if clipping is set to . Should the parser ignore issues where the document does not conform to the PDF specification? The used to record messages raised by the parsing process. The password to use to open the document if it is encrypted. If you need to supply multiple passwords to test against you can use . The value of will be included in the list to test against. All passwords to try when opening this document, will include any values set for . Skip extracting content where the font could not be found, will result in some letters being skipped/missed but will prevent the library throwing where the source PDF has some corrupted text. Also skips XObjects like forms and images when missing. Provides access to document level information for this PDF document as well as access to the s contained in the document. The metadata associated with this document. Access to the underlying raw structure of the document. Access to rare or advanced features of the PDF specification. The version number of the PDF specification which this file conforms to, for example 1.4. Get the number of pages in this document. Whether the document content is encrypted. Creates a for reading from the provided file bytes. The bytes of the PDF file. Optional parameters controlling parsing. A providing access to the file contents. Opens a file and creates a for reading from the provided file path. The full path to the file location of the PDF file. Optional parameters controlling parsing. A providing access to the file contents. Creates a for reading from the provided stream. The caller must manage disposing the stream. The created PdfDocument will not dispose the stream. A stream of the file contents, this must support reading and seeking. The PdfDocument will not dispose of the provided stream. Optional parameters controlling parsing. A providing access to the file contents. Get the page with the specified page number (1 indexed). The number of the page to return, this starts from 1. The page. Gets all pages in this document in order. Get the document level metadata if present. The metadata is XML in the (Extensible Metadata Platform) XMP format. This will throw a if called on a disposed . The metadata stream if it exists. if the metadata is present, otherwise. Gets the bookmarks if this document contains some. This will throw a if called on a disposed . Gets the form if this document contains one. This will throw a if called on a disposed . An from the document or if not present. Dispose the and close any unmanaged resources. Extensions for PDF types. Try and get the entry with a given name and type or look-up the object if it's an indirect reference. Get the decoded data from this stream. Character bounding box. The glyph bounds. THe width. Specifies the character collection associated with the (CIDFont). Identifies the issuer of the character collection. Uniquely identifies the character collection within the parent registry. The supplement number of the character collection. The stack of numeric operands currently active in a CharString. The current size of the stack. Whether it's possible to pop a value from either end of the stack. Remove and return the value from the top of the stack. The value from the top of the stack. Remove and return the value from the bottom of the stack. The value from the bottom of the stack. Adds the value to the top of the stack. The value to add. Removes all values from the stack. Specifies mapping from character identifiers to glyph indices. Can either be defined as a name in which case it must be Identity or a stream which defines the mapping. Glyph descriptions based on Adobe Type 1 format. Glyph descriptions based on TrueType format. A CID font contains glyph descriptions accessed by CID (character identifier) as character selectors. A CID font contains information about a CIDFont program but is not itself a font. It can only be a descendant of a Type 0 font. Either Type0 (Adobe Type 1 font) or Type2 (TrueType font). The PostScript name of the CIDFont. The definition of the character collection for the font. Returns the glyph path for the given character code. Character code in a PDF. Not to be confused with unicode. The glyph path for the given character code. Returns the glyph path for the given character code. Character code in a PDF. Not to be confused with unicode. The glyph path for the given character code. Returns the normalised glyph path for the given character code in a PDF. Character code in a PDF. Not to be confused with unicode. The normalized glyph path for the given character code. Returns the normalised glyph path for the given character code in a PDF. Character code in a PDF. Not to be confused with unicode. The normalized glyph path for the given character code. Represents either an Adobe Type 1 or TrueType font program for a CIDFont. Type 0 CID fonts contain glyph descriptions based on the Adobe Type 1 font format. Type 2 CID fonts contains glyph descriptions based on the TrueType font format. Defines the default position and displacement vector vertical components for fonts which have vertical writing modes. The default value of if not defined by a font. The vertical component of the position vector. The full position vector unless overridden by the W2 array is: (w0/2, Position) Where w0 is the width of the given glyph. The vertical component of the displacement vector. The full displacement vector is: (0, Displacement) Create a new . Get the full position vector for a given glyph. Get the full displacement vector. Glyphs from fonts which support vertical writing mode define displacement and position vectors. The position vector specifies how the horizontal writing origin is transformed into the vertical writing origin. The displacement vector specifies how far to move vertically before drawing the next glyph. The default position and displacement vectors where not overridden. Overrides displacement vector y components for glyphs specified by CID code. Overrides position vector (x and y) components for glyphs specified by CID code. Create new . Get the position vector used to convert horizontal glyph origin to vertical origin. Get the displacement vector used to move the origin to the next glyph location after drawing. A mutable class used when parsing and generating a . Defines the character collection associated CIDFont/s for this CMap. An that determines the writing mode for any CIDFont combined with this CMap. 0: Horizontal 1: Vertical Defined as optional. The PostScript name of the CMap. Defined as required. Defines the version of this CIDFont file. Defined as optional. Defines changes to the internal structure of Character Map files or operator semantics. Defined as required. Maps from a single character code to its CID. The character code. The CID to map to. Creates a new single mapping from a character code to a CID. Associates the beginning and end of a range of character codes with the starting CID for the range. The beginning of the range of character codes. The end of the range of character codes. The CID associated with the beginning character code. Creates a new to associate a range of character codes to a range of CIDs. The first character code in the range. The last character code in the range. The first CID for the range. Determines if this contains a mapping for the character code. Attempts to map the given character code to the corresponding CID in this range. Character code The CID if found. if the character code maps to a CID in this range or if the character is out of range. The CMap (character code map) maps character codes to character identifiers (CIDs). The set of characters which a CMap refers to is the "character set" (charset). Defines the type of the internal organization of the CMap file. Defines the name of the CMap file. The version number of the CIDFont file. Describes the set of valid input character codes. Associates ranges of character codes with their corresponding CID values. Overrides CID mappings for single character codes. Controls whether the font associated with the CMap writes horizontally or vertically. Issue #202 seems to indicate empty codespace ranges are possible. Returns the sequence of Unicode characters for the given character code. Character code Unicode characters(may be more than one, e.g "fi" ligature) if this character map contains an entry for this code, otherwise. Converts a character code to a CID. The character code. The corresponding CID for the character code. A codespace range is specified by a pair of codes of some particular length giving the lower and upper bounds of that range. The lower-bound of this range. The upper-bound of this range. The lower-bound of this range as an integer. The upper-bound of this range as an integer. The number of bytes for numbers in this range. Creates a new instance of . Returns if the given code bytes match this codespace range. Returns true if the given code bytes match this codespace range. Defines the information content (actual text) of the font as opposed to the display format. Does the font provide a CMap to map CIDs to Unicode values? Is this document (unexpectedly) using a predefined Identity-H/V CMap as its ToUnicode CMap? Defines glyphs using a CIDFont Holds the location and type of the stream containing the corresponding font program. This can either be a Type 1 font program (FontFile - ), a TrueType font program (FontFile2 - ) or a font program whose format is given by the Subtype of the stream dictionary (FontFile3 - ). At most only 1 of these entries is present. The object containing the stream for this font program. The type of the font program represented by this descriptor. Create a new . The type of font program represented by the stream used by this font descriptor. A Type 1 font program. A TrueType font program. A type defined by the stream dictionary's Subtype entry. Specifies metrics and attributes of a simple font or CID Font for the whole font rather than per-glyph. Provides information to enable consumer applications to find a substitute font when the font is unavailable. Font descriptors are not used with Type 0 fonts. A font descriptor is a dictionary used to specify various attributes. The PostScript name for the font. Required The preferred font family. Optional The font stretch value. Optional The weight/thickness of the font. Possible values: 100
200
300
500 (normal)
600
700
800
900
Optional
Defines various font characteristics. See . Required A rectangle in glyph coordinates which represents the smallest rectangle containing all glyphs of the font. Required (Except Type 3) The angle in degrees counter-clockwise from vertical of the vertical lines of the font. The value is negative for fonts sloping right (italic fonts). 9 o'clock is represented by 90 degrees. 3 o'clock is -90 degrees. Required The maximum height above the baseline for any glyph from this font (except for accents). Required (Except Type 3) The maximum depth below the baseline for any glyph in the font. This is negative. Required (Except Type 3) The spacing between consecutive lines of text. Default 0. Optional The vertical distance of the top of flat capital letters from the baseline. Required (Where Latin Characters, Except Type 3) The x height of the font. The vertical distance of the top of flat non-ascending lowercase letters (e.g. x) from the baseline. Default 0. Optional The horizontal thickness of vertical stems of glyphs. Required (Except Type 3) The vertical thickness of horizontal stems of glyphs. Default 0. Optional The average glyph width in the font. Default 0. Optional The maximum glyph width in the font. Default 0. Optional The width for character codes whose widths are not present in the Widths array of the font dictionary. Default 0. Optional The bytes of the font program. Optional The character names defined in a font subset. Optional Create a new . Provides a mutable way to construct a . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Sets the . Create a new . Create the with values from this builder. Specifies various characteristics of a font. No flags are set. All glyphs have the same width. Glyphs have serifs. There are glyphs outside the Adobe standard Latin set. The glyphs resemble cursive handwriting. Font uses a (sub)set of the Adobe standard Latin set. Cannot be set at the same time as . Font is italic. Font contains only uppercase letters. Lowercase letters are smaller versions of the uppercase equivalent. Forces small bold text to be rendered bold. Summary details of the font used to draw a glyph. The normal weight for a font. The bold weight for a font. The font name. Whether the font is bold. The font weight, values above 500 represent bold. Whether the font is italic. Create a new . The font stretch. Not specified or not a recognised value. Ultra Condensed. Extra Condensed. Condensed. Semi Condensed. Normal Semi Expanded Expanded Extra Expanded Ultra Expanded Font base interface. The font name. Is the font vertical. The font details. Read the character code. Try get the unicode value. Get the font bounding box. Get the font transformation matrix. Returns the glyph path for the given character code. Character code in a PDF. Not to be confused with unicode. The glyph path for the given character code. Returns the normalised glyph path for the given character code in a PDF. Character code in a PDF. Not to be confused with unicode. The normalized glyph path for the given character code. A font which supports a vertical writing mode in addition to the default horizontal writing mode. In vertical fonts the glyph position is described by a position vector from the origin used for horizontal writing. The position vector is applied to the horizontal writing origin to give a new vertical writing origin. The beginbfrange and endbfrange operators map i ranges of input codes to the corresponding output code range. Provides parsing for a certain operator type in a CID font definition. The type of the token preceding the operation we wish to parse. Parse the definition for this part of the CID font and write the results to the . Some TrueType fonts use both the Standard 14 descriptor and the TrueType font from disk. A font based on the Adobe Type 1 font format. A font using one of the Adobe Standard 14 fonts. Can use a custom encoding. Not implemeted. Not implemeted. Type 3 fonts are usually unnamed. Type 3 fonts do not use vector paths. Always returns false. Type 3 fonts do not use vector paths. Always returns false. Render page as an image. Render page as an image. The pdf page. The scale to apply to the page (i.e. zoom level). The output image format, if supported. The image as a memory stream. The output image format of the . Bitmap image format. Jpeg/Jpg image format. Png image format. Tiff image format. Gif image format. Provides access to explore and retrieve the underlying PDF objects from the document. The root of the document's hierarchy providing access to the page tree as well as other information. The cross-reference table enables direct access to objects by number. Provides access to tokenization capabilities for objects by object number. Retrieve the tokenized object with the specified object reference number. The object reference number. The tokenized PDF object from the file. Tokenizes objects from bytes in a PDF file. Tokenize the object with a given object number. May return null when the reference is undefined The object number for the object to tokenize. The tokenized object. Adds the token to an internal cache that will be returned instead of scanning the source PDF data. The object number for the object to replace. The token to replace the existing data. Since we want to scan objects while reading the cross reference table we lazily load it when it's ready. Indicates whether we now have a cross reference table. Stores tokens encountered between obj - endobj markers for each call. Cleared after each operation. Used internally by the when reading streams to store any occurrences of 'endobj' or 'endstream' observed. The offset at which the token started in the file. The type, one of either or . Create a new Used to calculate the Adler-32 checksum used for ZLIB data in accordance with RFC 1950: ZLIB Compressed Data Format Specification. Calculate the Adler-32 checksum for some data. Indicates that the value of the marked element could be null sometimes, so the check for null is necessary before its usage. [CanBeNull] object Test() => null; void UseTest() { var p = Test(); var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' } Indicates that the value of the marked element could never be null. [NotNull] object Foo() { return null; // Warning: Possible 'null' assignment } Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task and Lazy classes to indicate that the value of a collection item, of the Task.Result property or of the Lazy.Value property can never be null. Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task and Lazy classes to indicate that the value of a collection item, of the Task.Result property or of the Lazy.Value property can be null. Indicates that the marked method builds string by format pattern and (optional) arguments. Parameter, which contains format string, should be given in constructor. The format string should be in -like form. [StringFormatMethod("message")] void ShowError(string message, params object[] args) { /* do something */ } void Foo() { ShowError("Failed: {0}"); // Warning: Non-existing argument in format string } Specifies which parameter of an annotated method should be treated as format-string For a parameter that is expected to be one of the limited set of values. Specify fields of which type should be used as values for this parameter. Indicates that the function argument should be string literal and match one of the parameters of the caller function. For example, ReSharper annotates the parameter of . void Foo(string param) { if (param == null) throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol } Indicates that the method is contained in a type that implements System.ComponentModel.INotifyPropertyChanged interface and this method is used to notify that some property value changed. The method should be non-static and conform to one of the supported signatures: NotifyChanged(string) NotifyChanged(params string[]) NotifyChanged{T}(Expression{Func{T}}) NotifyChanged{T,U}(Expression{Func{T,U}}) SetProperty{T}(ref T, T, string) public class Foo : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; [NotifyPropertyChangedInvocator] protected virtual void NotifyChanged(string propertyName) { ... } string _name; public string Name { get { return _name; } set { _name = value; NotifyChanged("LastName"); /* Warning */ } } } Examples of generated notifications: NotifyChanged("Property") NotifyChanged(() => Property) NotifyChanged((VM x) => x.Property) SetProperty(ref myField, value, "Property") Describes dependency between method input and output.

Function Definition Table syntax:

FDT ::= FDTRow [;FDTRow]* FDTRow ::= Input => Output | Output <= Input Input ::= ParameterName: Value [, Input]* Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} Value ::= true | false | null | notnull | canbenull If method has single input parameter, it's name could be omitted.
Using halt (or void/nothing, which is the same) for method output means that the methos doesn't return normally (throws or terminates the process).
Value canbenull is only applicable for output parameters.
You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon. There is no notion of order rows, all rows are checked for applicability and applied per each program state tracked by R# analysis.
[ContractAnnotation("=> halt")] public void TerminationMethod() [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // regular assertion method [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() // A method that returns null if the parameter is null, // and not null if the parameter is not null [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) [ContractAnnotation("=> true, result: notnull; => false, result: null")] public bool TryParse(string s, out Person result)
Indicates that marked element should be localized or not. [LocalizationRequiredAttribute(true)] class Foo { string str = "my string"; // Warning: Localizable string } Indicates that the value of the marked type (or its derivatives) cannot be compared using '==' or '!=' operators and Equals() should be used instead. However, using '==' or '!=' for comparison with null is always permitted. [CannotApplyEqualityOperator] class NoEquality { } class UsesNoEquality { void Test() { var ca1 = new NoEquality(); var ca2 = new NoEquality(); if (ca1 != null) { // OK bool condition = ca1 == ca2; // Warning } } } When applied to a target attribute, specifies a requirement for any type marked with the target attribute to implement or inherit specific type or types. [BaseTypeRequired(typeof(IComponent)] // Specify requirement class ComponentAttribute : Attribute { } [Component] // ComponentAttribute requires implementing IComponent interface class MyComponent : IComponent { } Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), so this symbol will not be marked as unused (as well as by other usage inspections). Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections) Only entity marked with attribute considered used. Indicates implicit assignment to a member. Indicates implicit instantiation of a type with fixed constructor signature. That means any unused constructor parameters won't be reported as such. Indicates implicit instantiation of a type. Specify what is considered used implicitly when marked with or . Members of entity marked with attribute are considered used. Entity marked with attribute and all its members considered used. This attribute is intended to mark publicly available API which should not be removed and so is treated as used. Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. If the parameter is a delegate, indicates that delegate is executed while the method is executed. If the parameter is an enumerable, indicates that it is enumerated while the method is executed. Indicates that a method does not make any observable state changes. The same as System.Diagnostics.Contracts.PureAttribute. [Pure] int Multiply(int x, int y) => x * y; void M() { Multiply(123, 42); // Waring: Return value of pure method is not used } Indicates that the return value of method invocation must be used. Indicates the type member or parameter of some type, that should be used instead of all other ways to get the value that type. This annotation is useful when you have some "context" value evaluated and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. class Foo { [ProvidesContext] IBarService _barService = ...; void ProcessNode(INode node) { DoSomething(node, node.GetGlobalServices().Bar); // ^ Warning: use value of '_barService' field } } Indicates that a parameter is a path to a file or a folder within a web project. Path can be relative or absolute, starting from web root (~). An extension method marked with this attribute is processed by ReSharper code completion as a 'Source Template'. When extension method is completed over some expression, it's source code is automatically expanded like a template at call site. Template method body can contain valid source code and/or special comments starting with '$'. Text inside these comments is added as source code when the template is applied. Template parameters can be used either as additional method parameters or as identifiers wrapped in two '$' signs. Use the attribute to specify macros for parameters. In this example, the 'forEach' method is a source template available over all values of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: [SourceTemplate] public static void forEach<T>(this IEnumerable<T> xs) { foreach (var x in xs) { //$ $END$ } } Allows specifying a macro for a parameter of a source template. You can apply the attribute on the whole method or on any of its additional parameters. The macro expression is defined in the property. When applied on a method, the target template parameter is defined in the property. To apply the macro silently for the parameter, set the property value = -1. Applying the attribute on a source template method: [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] public static void forEach<T>(this IEnumerable<T> collection) { foreach (var item in collection) { //$ $END$ } } Applying the attribute on a template method parameter: [SourceTemplate] public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { /*$ var $x$Id = "$newguid$" + x.ToString(); x.DoSomething($x$Id); */ } Allows specifying a macro that will be executed for a source template parameter when the template is expanded. Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. If the target parameter is used several times in the template, only one occurrence becomes editable; other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, use values >= 0. To make the parameter non-editable when the template is expanded, use -1. > Identifies the target parameter of a source template if the is applied on a template method. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC action. If applied to a method, the MVC action name is calculated implicitly from the context. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). ASP.NET MVC attribute. Indicates that a parameter is an MVC area. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC controller. If applied to a method, the MVC controller name is calculated implicitly from the context. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC partial view. If applied to a method, the MVC partial view name is calculated implicitly from the context. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. Use this attribute for custom wrappers similar to System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). ASP.NET MVC attribute. Indicates that a parameter is an MVC template. Use this attribute for custom wrappers similar to System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC view component. If applied to a method, the MVC view name is calculated implicitly from the context. Use this attribute for custom wrappers similar to System.Web.Mvc.Controller.View(Object). ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC view component name. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC view component view. If applied to a method, the MVC view component view name is default. ASP.NET MVC attribute. When applied to a parameter of an attribute, indicates that this parameter is an MVC action name. [ActionName("Foo")] public ActionResult Login(string returnUrl) { ViewBag.ReturnUrl = Url.Action("Foo"); // OK return RedirectToAction("Bar"); // Error: Cannot resolve action } Razor attribute. Indicates that a parameter or a method is a Razor section. Use this attribute for custom wrappers similar to System.Web.WebPages.WebPageBase.RenderSection(String). Indicates how method, constructor invocation or property access over collection type affects content of the collection. Method does not use or modify content of the collection. Method only reads content of the collection but does not modify it. Method can change content of the collection but does not add new elements. Method can add new elements to the collection. Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied. To set the condition, mark one of the parameters with attribute. Indicates the condition parameter of the assertion method. The method itself should be marked by attribute. The mandatory argument of the attribute is the assertion type. Specifies assertion type. If the assertion method argument satisfies the condition, then the execution continues. Otherwise, execution is assumed to be halted. Marked parameter should be evaluated to true. Marked parameter should be evaluated to false. Marked parameter should be evaluated to null value. Marked parameter should be evaluated to not null value. Indicates that the marked method unconditionally terminates control flow execution. For example, it could unconditionally throw exception. Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, .Where). This annotation allows inference of [InstantHandle] annotation for parameters of delegate type by analyzing LINQ method chains. Indicates that IEnumerable, passed as parameter, is not enumerated. Indicates that parameter is regular expression pattern. Prevents the Member Reordering feature from tossing members of the marked class. The attribute must be mentioned in your member reordering patterns XAML attribute. Indicates the type that has ItemsSource property and should be treated as ItemsControl-derived type, to enable inner items DataContext type resolve. XAML attribute. Indicates the property of some BindingBase-derived type, that is used to bind some item of ItemsControl-derived type. This annotation will enable the DataContext type resolve for XAML bindings for such properties. Property should have the tree ancestor of the ItemsControl type or marked with the attribute. Helper class for dates. Try parsing a pdf formatted date string into a . Date values used in a PDF shall conform to a standard date format, which closely follows that of the international standard ASN.1, defined in ISO/IEC 8824. A date shall be a text string of the form (D:YYYYMMDDHHmmSSOHH'mm). The pdf formated date string, e.g. D:199812231952-08'00. The parsed date. True if parsed. Default Word Extractor. Gets the words. The letters in the page. Create an instance of Default Word Extractor, . Utility functions for hex encoding. @author John Hewson for hex conversion. https://stackoverflow.com/questions/2817752/java-code-to-convert-byte-to-hexadecimal Returns a hex string for the given byte array. An approach used to generate words from a set of letters. Generate words from the input set of letters. The letters to generate words for. An enumerable of words from this approach. The identity matrix. The result of multiplying a matrix with the identity matrix is the matrix itself. Creates a 3x3 matrix with the following layout: | m11 m12 m13 | | m21 m22 m23 | | m31 m32 m33 | Returns a new matrix that is the inverse of this matrix (i.e. multiplying a matrix with its inverse matrix yields the identity matrix). If an inverse matrix does not exist, null is returned. Returns a new matrix with each element being a mulitple of the supplied factor. Multiplies this matrix with the supplied 3-element vector and returns a new 3-element vector as the result. Returns a new matrix that is the 'dot product' of this matrix and the supplied matrix. Returns a new matrix that is the transpose of this matrix (i.e. the tranpose of a matrix, is a matrix with its rows and column interchanged) Measures of whitespace size based on point size. Get the average whitespace sized expected for a given letter. Check if the measured gap is probably big enough to be a whitespace character based on the letter. Sets if the stream writer should attempt to deduplicate objects. May not have any affect if does not support deduplication. The underlying stream used by the writer. Writes a single token to the stream. Token to write. Indirect reference to the token. Writes a token to a reserved object number. Token to write. Reserved indirect reference. Reserved indirect reference. Reserves an object number for an object to be written. Useful with cyclic references where object number must be known before writing. A reserved indirect reference. Initializes the PDF stream with pdf header. Version of PDF. Completes the PDF writing trailing PDF information. Indirect reference of catalog. Reference to document information (optional) Writes any type of to the corresponding PDF document format output. Writes the given input token to the output stream with the correct PDF format and encoding including whitespace and line breaks as applicable. The token to write to the stream. The stream to write the token to. Writes pre-serialized token as an object token to the output stream. Object number of the indirect object. Generation of the indirect object. Pre-serialized object contents. The stream to write the token to. Writes a valid single section cross-reference (xref) table plus trailer dictionary to the output for the set of object offsets. The byte offset from the start of the document for each object in the document. The object representing the catalog dictionary which is referenced from the trailer dictionary. The output stream to write to. The object reference for the document information dictionary if present. Derived class of that does not write or operations in streams Write stream without or operations Try get a stream without or operations. true if any text operation found (and we have a valid without the text operations), false if no text operation found (in which case is null) The standard of PDF/A compliance for generated documents. No PDF/A compliance. Compliance with PDF/A1-B. Level B (basic) conformance are standards necessary for the reliable reproduction of a document's visual appearance. Compliance with PDF/A1-A. Level A (accessible) conformance are PDF/A1-B standards in addition to features intended to improve a document's accessibility. Compliance with PDF/A2-B. Level B (basic) conformance are standards necessary for the reliable reproduction of a document's visual appearance. Compliance with PDF/A2-A. Level A (accessible) conformance are PDF/A2-B standards in addition to features intended to improve a document's accessibility. Compliance with PDF/A3-B. Level B (basic) conformance are PDF/A2-B standards in addition to support for embedded files Compliance with PDF/A3-A. Level A (accessible) conformance are PDF/A3-B standards in addition to features intended to improve a document's accessibility. A hash combiner that is implemented with the Fowler/Noll/Vo algorithm (FNV-1a). This is a mutable struct for performance reasons. The starting point of the FNV hash. The prime number used to compute the FNV hash. Gets the current result of the hash function. Creates a new FNV hash initialized to . Adds the specified byte to the hash. The byte to hash. Adds the specified integer to this hash, in little-endian order. The integer to hash. Provides methods to construct new PDF documents. The standard of PDF/A compliance of the generated document. Defaults to . Whether to include the document information dictionary in the produced document. The values of the fields to include in the document information dictionary. The bookmark nodes to include in the document outline dictionary. The current page builders in the document and the corresponding 1 indexed page numbers. Use or to add a new page. The fonts currently available in the document builder added via or . Keyed by id for internal purposes. Creates a document builder keeping resources in memory. Creates a document builder keeping resources in memory. Pdf version to use in header. Creates a document builder using the supplied stream. Steam to write pdf to. If stream should be disposed when builder is. Type of pdf stream writer to use Pdf version to use in header. Token writer to use Determines whether the bytes of the TrueType font file provided can be used in a PDF document. The bytes of a TrueType font file. Any reason messages explaining why the file can't be used, if applicable. if the file can be used, otherwise. Adds a TrueType font to the builder so that pages in this document can use it. The bytes of a TrueType font. An identifier which can be passed to . Adds one of the Standard 14 fonts which are included by default in PDF programs so that pages in this document can use it. These Standard 14 fonts are old and possibly obsolete. The type of the Standard 14 font to use. An identifier which can be passed to . Add a new page with the specified size, this page will be included in the output when is called. The width of the page in points. The height of the page in points. A builder for editing the new page. Add a new page with the specified size, this page will be included in the output when is called. The size of the page to add. Whether the page is in portait or landscape orientation. A builder for editing the new page. Add a new page with the specified size, this page will be included in the output when is called. Source document. Page to copy. A builder for editing the page. Add a new page with the specified size, this page will be included in the output when is called. Source document. Page to copy. If set, links are copied based on the result of the delegate. A builder for editing the page. Builds a PDF document from the current content of this builder and its pages. The bytes of the resulting PDF document. A key representing a font available to use on the current document builder. Create by adding a font to a document using either or . The Id uniquely identifying this font on the builder. Reference to the added font. Create a new . Sets the values of the dictionary for the document being created. Control inclusion of the document information dictionary on the output with . . . . . . . . . Disposes underlying stream if set to do so. Merges PDF documents into each other. Merge two PDF documents together with the pages from followed by . Merge two PDF documents together with the pages from followed by into the output stream. Merge multiple PDF documents together with the pages in the order the file paths are provided. Merge multiple PDF documents together with the pages in the order the file paths are provided. Merge multiple PDF documents together with the pages in the order the file paths are provided into the output stream Merge multiple PDF documents together with the pages in the order the file paths are provided into the output stream Merge the set of PDF documents. Merge the set of PDF documents into the output stream The caller must manage disposing the stream. The created PdfDocument will not dispose the stream. A list of streams for the files contents, this must support reading and seeking. Must be writable A builder used to add construct a page in a PDF document. The number of this page, 1-indexed. The current size of the page. Access to the underlying data structures for advanced use cases. Access to Allow to append a new content stream before the current one and select it Allow to append a new content stream after the current one and select it Select a content stream from the list, by his index index of the content stream to be selected Draws a line on the current page between two points with the specified line width. The first point on the line. The last point on the line. The width of the line in user space units. Draws a rectangle on the current page starting at the specified point with the given width, height and line width. The position of the rectangle, for positive width and height this is the bottom-left corner. The width of the rectangle. The height of the rectangle. The width of the line border of the rectangle. Whether to fill with the color set by . Set the number of degrees by which the page is rotated clockwise when displayed or printed. Draws a triangle on the current page with the specified points and line width. Position of the first corner of the triangle. Position of the second corner of the triangle. Position of the third corner of the triangle. The width of the line border of the triangle. Whether to fill with the color set by . Draws a circle on the current page centering at the specified point with the given diameter and line width. The center position of the circle. The diameter of the circle. The width of the line border of the circle. Whether to fill with the color set by . Draws an ellipsis on the current page centering at the specified point with the given width, height and line width. The center position of the ellipsis. The width of the ellipsis. The height of the ellipsis. The width of the line border of the ellipsis. Whether to fill with the color set by . Sets the stroke color for any following operations to the RGB value. Use to reset. Red - 0 to 255 Green - 0 to 255 Blue - 0 to 255 Sets the stroke color with the exact decimal value between 0 and 1 for any following operations to the RGB value. Use to reset. Red - 0 to 1 Green - 0 to 1 Blue - 0 to 1 Sets the fill and text color for any following operations to the RGB value. Use to reset. Red - 0 to 255 Green - 0 to 255 Blue - 0 to 255 Restores the stroke, text and fill color to default (black). Calculates the size and position of each letter in a given string in the provided font without changing the state of the page. The text to measure each letter of. The size of the font in user space units. The position of the baseline (lower-left corner) to start drawing the text from. A font added to the document using or methods. The letters from the input text with their corresponding size and position. Draws the text in the provided font at the specified position and returns the letters which will be drawn. The text to draw to the page. The size of the font in user space units. The position of the baseline (lower-left corner) to start drawing the text from. A font added to the document using or methods. The letters from the input text with their corresponding size and position. Set the text rendering mode. This will apply to all future calls to AddText until called again. To insert invisible text, for example output of OCR, use TextRenderingMode.Neither. Text rendering mode to set. Adds the JPEG image represented by the input bytes at the specified location. Adds the JPEG image represented by the input stream at the specified location. Adds the JPEG image previously added using , this will share the same image data to prevent duplication. An image previously added to this page or another page. The size and location to draw the image on this page. Adds the image previously added using or sharing the same image to prevent duplication. Adds the PNG image represented by the input bytes at the specified location. Adds the PNG image represented by the input stream at the specified location. Copy a page from unknown source to this page Page to be copied Provides access to the raw page data structures for advanced editing use cases. The operations making up the page content stream. A key representing an image available to use for the current document builder. Create it by adding an image to a page using . The Id uniquely identifying this image on the builder. The reference to the stored image XObject. The width of the raw image in pixels. The height of the raw image in pixels. Create a new . This class would lazily flush all token. Allowing us to make changes to references without need to rewrite the whole stream Class to remove text from PDFs, useful as a preprocessing step for Optical Character Recognition (OCR). Note that this should not be used to redact content from PDFs, this is not a secure or reliable way to redact text. Return PDF without text as bytes Path to PDF List of pages to emit; if null all pages are emitted Write PDF without text to the output stream. The caller must manage disposing the output stream. Must be writable Path to PDF List of pages to emit; if null all pages are emitted Remove text from the PDF (passed in as a byte array) and return it as a new byte array PDF document (as byte array) List of pages to emit; if null all pages are emitted PDF without text (as a byte array) Remove text from the PDF in the input stream and write it to the output stream. The caller must manage disposing the stream. The created PdfDocument will not dispose the stream. Streams for the file contents, this must support reading and seeking. Must be writable List of pages to emit; if null all pages are emitted Remove text from the PDF and write it to the output stream. The caller must manage disposing the stream. The created PdfDocument will not dispose the stream. PDF document Must be writable List of pages to emit; if null all pages are emitted Type of pdf writer to use. Default output writer De-duplicates objects while writing but requires keeping in memory reference. Writes any type of to the corresponding PDF document format output. Bytes that indicate start of stream Bytes that indicate end start of stream Single global instance Writes the given input token to the output stream with the correct PDF format and encoding including whitespace and line breaks as applicable. The token to write to the stream. The stream to write the token to. Write a hex value to the output stream Write an array to the output stream, with whitespace at the end. Write a boolean "true" or "false" to the output stream, with whitespace at the end. Write a "%comment" in the output stream, with a line break at the end. Writes dictionary key/value pairs to output stream as Name/Token pairs. Write an indirect reference to the stream, with whitespace at the end. Write a name to the stream, with whitespace at the end. Write a number to the stream, with whitespace at the end. Write an object to the stream, with a line break at the end. It writes the following contents: - "[ObjectNumber] [Generation] obj" - Object data - "endobj" Write a stream token to the output stream, with the following contents: - Dictionary specifying the length of the stream, any applied compression filters and additional information. - Stream start indicator - Bytes in the StreamToken data - Stream end indicator Write string to the stream, with whitespace at the end Write an integer to the stream Write a line break to the output stream Write a long to the stream Write a space to the output stream The purpose of this method is to resolve indirect reference. That mean copy the reference's content to the new document's stream and replace the indirect reference with the correct/new one PDF stream writer Token to inspect for reference scanner get the content from the original document Map of previously copied tokens for original document. Call stack of indirect references A reference of the token that was copied. With all the reference updated A PostScript image XObject. The JPX filter encodes data using the JPEG2000 compression method. A JPEG2000 data stream allows different versions of the image to be decoded allowing for thumbnails to be extracted. Creates a new . XObject type. Image. Form. PostScript.