Other Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVectorObj : NSObject
    {
    
    
    }
    
    
    
    
    - (unsigned long)size;
    - (unsigned long)capacity;
    - (void)reserve: (unsigned long)n;
    - (BOOL)isEmpty;
    - (void)clear;
    - (void)add: (PTObj*)x;
    - (PTObj*)get: (int)i;
    - (void)set: (int)i val:  (PTObj*)val;
    - (instancetype)init;
    @end

    Swift

    class PTVectorObj : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVectorPage : NSObject
    {
    
    
    }
    
    
    
    
    - (unsigned long)size;
    - (unsigned long)capacity;
    - (void)reserve: (unsigned long)n;
    - (BOOL)isEmpty;
    - (void)clear;
    - (void)add: (PTPage*)x;
    - (PTPage*)get: (int)i;
    - (void)set: (int)i val:  (PTPage*)val;
    - (instancetype)init;
    @end

    Swift

    class PTVectorPage : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVectorRedaction : NSObject
    {
    
    
    }
    
    
    
    
    - (unsigned long)size;
    - (unsigned long)capacity;
    - (void)reserve: (unsigned long)n;
    - (BOOL)isEmpty;
    - (void)clear;
    - (void)add: (PTRedaction*)x;
    - (PTRedaction*)get: (int)i;
    - (void)set: (int)i val:  (PTRedaction*)val;
    - (instancetype)init;
    @end

    Swift

    class PTVectorRedaction : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVectorQuadPoint : NSObject
    {
    
    
    }
    
    
    
    
    - (unsigned long)size;
    - (unsigned long)capacity;
    - (void)reserve: (unsigned long)n;
    - (BOOL)isEmpty;
    - (void)clear;
    - (void)add: (PTQuadPoint*)x;
    - (PTQuadPoint*)get: (int)i;
    - (void)set: (int)i val:  (PTQuadPoint*)val;
    - (instancetype)init;
    @end

    Swift

    class PTVectorQuadPoint : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVectorAnnot : NSObject
    {
    
    
    }
    
    
    
    
    - (unsigned long)size;
    - (unsigned long)capacity;
    - (void)reserve: (unsigned long)n;
    - (BOOL)isEmpty;
    - (void)clear;
    - (void)add: (PTAnnot*)x;
    - (PTAnnot*)get: (int)i;
    - (void)set: (int)i val:  (PTAnnot*)val;
    - (instancetype)init;
    @end

    Swift

    class PTVectorAnnot : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TRN_matrix2d : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setM_a: (double)value;
    - (double)getM_a;
    - (void)setM_b: (double)value;
    - (double)getM_b;
    - (void)setM_c: (double)value;
    - (double)getM_c;
    - (void)setM_d: (double)value;
    - (double)getM_d;
    - (void)setM_h: (double)value;
    - (double)getM_h;
    - (void)setM_v: (double)value;
    - (double)getM_v;
    - (instancetype)init;
    @end

    Swift

    class TRN_matrix2d : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TRN_date : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setYear: (unsigned short)value;
    - (unsigned short)getYear;
    - (void)setMonth: (char)value;
    - (char)getMonth;
    - (void)setDay: (char)value;
    - (char)getDay;
    - (void)setHour: (char)value;
    - (char)getHour;
    - (void)setMinute: (char)value;
    - (char)getMinute;
    - (void)setSecond: (char)value;
    - (char)getSecond;
    - (void)setUT: (char)value;
    - (char)getUT;
    - (void)setUT_hour: (char)value;
    - (char)getUT_hour;
    - (void)setUT_minutes: (char)value;
    - (char)getUT_minutes;
    - (void)setMp_obj: (void *)value;
    - (void *)getMp_obj;
    - (instancetype)init;
    @end

    Swift

    class TRN_date : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TRN_chardata : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setChar_code: (unsigned int)value;
    - (unsigned int)getChar_code;
    - (void)setX: (double)value;
    - (double)getX;
    - (void)setY: (double)value;
    - (double)getY;
    - (void)setChar_data: (NSData*)value;
    - (NSData*)getChar_data;
    - (void)setBytes: (int)value;
    - (int)getBytes;
    - (instancetype)init;
    @end

    Swift

    class TRN_chardata : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TRN_point : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setX: (double)value;
    - (double)getX;
    - (void)setY: (double)value;
    - (double)getY;
    - (instancetype)init;
    @end

    Swift

    class TRN_point : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface TRN_quadpoint : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setP1x: (double)value;
    - (double)getP1x;
    - (void)setP1y: (double)value;
    - (double)getP1y;
    - (void)setP2x: (double)value;
    - (double)getP2x;
    - (void)setP2y: (double)value;
    - (double)getP2y;
    - (void)setP3x: (double)value;
    - (double)getP3x;
    - (void)setP3y: (double)value;
    - (double)getP3y;
    - (void)setP4x: (double)value;
    - (double)getP4x;
    - (void)setP4y: (double)value;
    - (double)getP4y;
    - (instancetype)init;
    @end

    Swift

    class TRN_quadpoint : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTPDFPoint : TRN_point
    
    
    
    
    - (instancetype)init;- (instancetype)initWithPx: (double)px py:  (double)py;
    @end

    Swift

    class PTPDFPoint : TRN_point
  • RecentlyUsedCache
    
    RecentlyUsedCache is a persistent cache that provides thumbnails for recently
    used documents in PDFNet.  The cache is stored in the PDFNet Resources folder,
    which can be set by calling PDFNet::SetPersistentCachePath. The cache will be used by
    any PDFNet process that uses the resource path.  If more than one PDFNet process
    is running concurrently, the first process to acquire a lock on the cache will
    use it.  Subsequent processes will not read or modify the cache.
    
    Recently used cache will track the order of N recently used documents, and store
    references to generated PNG thumbnails for those documents.  Most of this functionality
    happens 'magically', without any necessary user action.
    
    See more

    Declaration

    Objective-C

    @interface PTRecentlyUsedCache : NSObject

    Swift

    class PTRecentlyUsedCache : NSObject
  • 2D Matrix

    A Matrix2D object represents a 3x3 matrix that, in turn, represents an affine transformation. A Matrix2D object stores only six of the nine numbers in a 3x3 matrix because all 3x3 matrices that represent affine transformations have the same third column (0, 0, 1).

    Affine transformations include rotating, scaling, reflecting, shearing, and translating. In PDFNet, the Matrix2D class provides the foundation for performing affine transformations on vector drawings, images, and text.

    A transformation matrix specifies the relationship between two coordinate spaces. By modifying a transformation matrix, objects can be scaled, rotated, translated, or transformed in other ways.

    A transformation matrix in PDF is specified by six numbers, usually in the form of an array containing six elements. In its most general form, this array is denoted [a b c d h v]; The following table lists the arrays that specify the most common transformations:

    • Translations are specified as [1 0 0 1 tx ty], where tx and ty are the distances to translate the origin of the coordinate system in the horizontal and vertical dimensions, respectively.

    • Scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system.

    • Rotations are produced by [cos(A) sin(A) -sin(A) cos(A) 0 0], which has the effect of rotating the coordinate system axes by an angle ‘A’ counterclockwise.

    • Skew is specified by [1 tan(A) tan(B) 1 0 0], which skews the x axis by an angle A and the y axis by an angle B.

    Matrix2D elements are positioned as follows : | m_a m_b 0 | | m_c m_d 0 | | m_h m_v 1 |

    A single Matrix2D object can store a single transformation or a sequence of transformations. The latter is called a composite transformation. The matrix of a composite transformation is obtained by multiplying (concatenating) the matrices of the individual transformations. Because matrix multiplication is not commutative-the order in which matrices are multiplied is significant. For example, if you first rotate, then scale, then translate, you get a different result than if you first translate, then rotate, then scale.

    For more information on properties of PDF matrices please refer to PDF Reference Manual (Sections 4.2 ‘Coordinate Systems’ and 4.2.3 ‘Transformation Matrices’)

     The following sample illustrates how to use Matrix2D in order to position
     an image on the page. Note that PDFNet uses the same convention of matrix
     multiplication used in PostScript and OpenGL.
    
        Element element = eb.CreateImage(Image(...));
        double deg2rad = 3.1415926535 / 180.0;
    
        Matrix2D mtx = Matrix2D(1, 0, 0, 1, 0, 200); // Translate
        mtx *= Matrix2D(300, 0, 0, 200, 0, 0);    // Scale
        mtx *= Matrix2D::RotationMatrix( 90 * deg2rad ); // Rotate
        element.GetGState().SetTransform(mtx);
        writer.WritePlacedElement(element);
    
     The following sample sample illustrates how to use Matrix2D in order to calculate
     absolute positioning for the text on the page.
     ...
     Matrix2D text_mtx = text_element.GetTextMatrix();
     double x, y;
     for (CharIterator itr = text_element.GetCharIterator(); itr.HasNext(); itr.Next()) {
       x = itr.Current().x; // character positioning information
       y = itr.Current().y;
       // Get current transformation matrix (CTM)
       Matrix2D ctm = text_element.GetCTM();
    
       // To get the absolute character positioning information concatenate current
       // text matrix with CTM and then multiply relative positioning coordinates with
       // the resulting matrix.
       Matrix2D mtx = ctm * text_mtx;
       mtx.Mult(x, y);
     }
    
    See more

    Declaration

    Objective-C

    @interface PTMatrix2D : TRN_matrix2d

    Swift

    class PTMatrix2D : TRN_matrix2d
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTGSChangesIterator : NSObject
    {
    
    
    }
    
    
    
    
    
    - (void)Next;
    - (int)Current;
    - (BOOL)HasNext;
    - (instancetype)init;
    @end

    Swift

    class PTGSChangesIterator : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTUInt32Iterator : NSObject
    {
    
    
    }
    
    
    
    
    
    - (void)Next;
    - (SWIGTYPE_p_unsigned_int*)Current;
    - (BOOL)HasNext;
    - (instancetype)init;
    @end

    Swift

    class PTUInt32Iterator : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTCharIterator : NSObject
    {
    
    
    }
    
    
    
    
    
    - (void)Next;
    - (TRN_chardata*)Current;
    - (BOOL)HasNext;
    - (instancetype)init;
    @end

    Swift

    class PTCharIterator : NSObject
  • MemoryFilter is a memory buffer that can be used as a source or a sink Filter in the Filter pipeline. When a MemoryFilter is the source, other filters can read data stored in memory; When MemoryFilter is a sink, other filters generate data which is then pushed in a memory buffer owned by MemoryFilter (MemoryFilter makes sure that there is enough space to accommodate all data).

    See more

    Declaration

    Objective-C

    @interface PTMemoryFilter : PTFilter

    Swift

    class PTMemoryFilter : PTFilter
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTHTTPRequestOptions : NSObject
    {
    
    
    }
    
    
    
    
    - (void)AddHeader: (NSString *)header val:  (NSString *)val;
    - (void)RestrictDownloadUsage: (BOOL)restricted;
    - (void)SkipByteRangeTest: (BOOL)skip;
    - (void)UseRemoteFileSize: (long long)size_in_bytes;
    - (instancetype)init;
    @end

    Swift

    class PTHTTPRequestOptions : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTSDFDocSnapshot : NSObject
    {
    
    
    }
    
    
    
    
    
    - (unsigned int)GetHash;
    - (BOOL)IsValid;
    - (BOOL)Equals: (PTSDFDocSnapshot*)snapshot;
    - (instancetype)initWithImpl: (SWIGTYPE_TRN_DocSnapshot*)impl;
    @end

    Swift

    class PTSDFDocSnapshot : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTSDFResultSnapshot : NSObject
    {
    
    
    }
    
    
    
    
    
    - (PTSDFDocSnapshot*)CurrentState;
    - (PTSDFDocSnapshot*)PreviousState;
    - (BOOL)IsOk;
    - (BOOL)IsNullTransition;
    - (instancetype)initWithImpl: (SWIGTYPE_TRN_ResultSnapshot*)impl;
    @end

    Swift

    class PTSDFResultSnapshot : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTSDFUndoManager : NSObject
    {
    
    
    }
    
    
    
    
    
    - (PTSDFDocSnapshot*)DiscardAllSnapshots;
    - (PTSDFResultSnapshot*)Undo;
    - (BOOL)CanUndo;
    - (PTSDFDocSnapshot*)GetNextUndoSnapshot;
    - (PTSDFResultSnapshot*)Redo;
    - (BOOL)CanRedo;
    - (PTSDFDocSnapshot*)GetNextRedoSnapshot;
    - (PTSDFResultSnapshot*)TakeSnapshot;
    - (instancetype)initWithImpl: (SWIGTYPE_TRN_UndoManager*)impl;
    @end

    Swift

    class PTSDFUndoManager : NSObject
  • Although PDF is not a programming language it provides several types of function object that represent parameterized classes of functions, including mathematical formulas and sampled representations with arbitrary resolution. Functions are used in various ways in PDF, including device-dependent rasterization information for high-quality printing (halftone spot functions and transfer functions), color transform functions for certain color spaces, and specification of colors as a function of position for smooth shadings. Functions in PDF represent static, self-contained numerical transformations.

    PDF::Function represents a single, flat interface around all PDF function types.

    See more

    Declaration

    Objective-C

    @interface PTFunction : NSObject

    Swift

    class PTFunction : NSObject
  • The class GeometryCollection. A Preprocessed PDF geometry collection

    See more

    Declaration

    Objective-C

    @interface PTGeometryCollection : NSObject

    Swift

    class PTGeometryCollection : NSObject
  • ColorPt is an array of colorants (or tint values) representing a color point in an associated color space.

    See more

    Declaration

    Objective-C

    @interface PTColorPt : NSObject

    Swift

    class PTColorPt : NSObject
  • This abstract class is used to serve as a color space tag to identify the specific color space of a Color object. It contains methods that transform colors in a specific color space to/from several color space such as DeviceRGB and DeviceCMYK.

    For purposes of the methods in this class, colors are represented as arrays of color components represented as doubles in a normalized range defined by each ColorSpace. For many ColorSpaces (e.g. DeviceRGB), this range is 0.0 to 1.0. However, some ColorSpaces have components whose values have a different range. Methods are provided to inquire per component minimum and maximum normalized values.

    Note

    Note that in Pattern color space (i.e. for ColorSpace::e_pattern) ‘color values’ are PDF::PatternColor objects instead of the numeric component values (i.e. ColorPt) used with other spaces.
    See more

    Declaration

    Objective-C

    @interface PTColorSpace : NSObject

    Swift

    class PTColorSpace : NSObject
  • Rect is a utility class used to manipulate PDF rectangle objects (refer to section 3.8.3 of the PDF Reference Manual).

    Rect can be associated with a SDF/Cos rectangle array using Rect(Obj*) constructor or later using Rect::Attach(Obj*) or Rect::Update(Obj*) methods.

    Rect keeps a local cache for rectangle points so it is necessary to call Rect::Update() method if the changes to the Rect should be saved in the attached Cos/SDF array.

    Note

    - Although rectangles are conventionally specified by their lower-left and upper-right corners, it is acceptable to specify any two diagonally opposite corners.
    See more

    Declaration

    Objective-C

    @interface PTPDFRect : NSObject

    Swift

    class PTPDFRect : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTPDFRectCollection : NSObject
    {
    
    
    }
    
    
    
    
    - (void)AddRect: (PTPDFRect*)to_add;
    - (PTPDFRect*)GetRectAt: (unsigned long)index;
    - (unsigned long)GetNumRects;
    - (void)Clear;
    - (instancetype)init;
    @end

    Swift

    class PTPDFRectCollection : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTViewChangeCollection : NSObject
    {
    
    
    }
    
    
    
    
    
    + (PTViewChangeCollection*)CreateInternal: (unsigned long long)impl;
    - (unsigned long long)GetHandleInternal;
    - (instancetype)init;
    @end

    Swift

    class PTViewChangeCollection : NSObject
  • Page is a high-level class representing PDF page object (see ‘Page Objects’ in Section 3.6.2, ‘Page Tree,’ in PDF Reference Manual).

    Among other associated objects, a page object contains:

    • A series of objects representing the objects drawn on the page (See Element and ElementReader class for examples of how to extract page content).
    • A list of resources used in drawing the page
    • Annotations
    • Beads, private metadata, optional thumbnail image, etc.
    See more

    Declaration

    Objective-C

    @interface PTPage : NSObject

    Swift

    class PTPage : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTPageIterator : NSObject
    {
    
    
    }
    
    
    
    
    
    - (void)Next;
    - (PTPage*)Current;
    - (BOOL)HasNext;
    - (instancetype)init;
    @end

    Swift

    class PTPageIterator : NSObject
  • The Date class is a utility class used to simplify work with PDF date objects.

    PDF defines a standard date format, which closely follows international standard ASN.1 (Abstract Syntax Notation One), A date is a string of the form (D:YYYYMMDDHHmmSSOHH'mm’); See PDF Reference Manual for details.

    Date can be associated with a SDF/Cos date string using Date(Obj*) constructor or later using Date::Attach(Obj*) or Date::Update(Obj*) methods.

    Date keeps a local date/time cache so it is necessary to call Date::Update() method if the changes to the Date should be saved in the attached Cos/SDF string.

    See more

    Declaration

    Objective-C

    @interface PTDate : TRN_date

    Swift

    class PTDate : TRN_date
  • GState is a class that keeps track of a number of style attributes used to visually define graphical Elements. Each PDF::Element has an associated GState that can be used to query or set various graphics properties.

    Note

    current clipping path is not tracked in the graphics state for efficiency reasons. In most cases tracking of the current clipping path is best left to the client.
    See more

    Declaration

    Objective-C

    @interface PTGState : NSObject

    Swift

    class PTGState : NSObject
  • Image class provides common methods for working with PDF images.

    Note

    PDF::Element contains a similar interface used to access image data. To create the Image object from image PDF::Element, pass the Element’s SDF/Cos dictionary to Image constructor (i.e. Image image(element->GetXObject()) )
    See more

    Declaration

    Objective-C

    @interface PTImage : NSObject

    Swift

    class PTImage : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTDigestAlgorithm : NSObject
    {
    
    
    }
    
    
    
    
    - (instancetype)init;
    @end

    Swift

    class PTDigestAlgorithm : NSObject
  • The class DisallowedChange. Data pertaining to a change detected in a document during a digital signature modification permissions verification step, the change bein g both made after the signature was signed, and disallowed by t he signature’s permissions settings.

    See more

    Declaration

    Objective-C

    @interface PTDisallowedChange : NSObject

    Swift

    class PTDisallowedChange : NSObject
  • The class VerificationOptions. Options pertaining to digital signature verification.

    See more

    Declaration

    Objective-C

    @interface PTVerificationOptions : NSObject

    Swift

    class PTVerificationOptions : NSObject
  • The class TrustVerificationResult. The detailed result of a trust verification step of a verification operation performed on a digital signature.

    See more

    Declaration

    Objective-C

    @interface PTTrustVerificationResult : NSObject

    Swift

    class PTTrustVerificationResult : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTVerificationResult : NSObject
    {
    
    
    }
    
    
    
    
    
    - (BOOL)GetVerificationStatus;
    - (PTVerificationResultDocumentStatus)GetDocumentStatus;
    - (PTVerificationResultDigestStatus)GetDigestStatus;
    - (PTVerificationResultTrustStatus)GetTrustStatus;
    - (PTVerificationResultModificationPermissionsStatus)GetPermissionsStatus;
    - (BOOL)HasTrustVerificationResult;
    - (PTTrustVerificationResult*)GetTrustVerificationResult;
    - (NSArray<PTDisallowedChange *> *)GetDisallowedChanges;
    - (PTDigestAlgorithmType)GetSignersDigestAlgorithm;
    - (instancetype)initWithImpl: (SWIGTYPE_TRN_VerificationResult*)impl;
    @end

    Swift

    class PTVerificationResult : NSObject
  • The class DigitalSignatureField. A class representing a digital signature form field.

    See more

    Declaration

    Objective-C

    @interface PTDigitalSignatureField : NSObject

    Swift

    class PTDigitalSignatureField : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTDigitalSignatureFieldIterator : NSObject
    {
    
    
    }
    
    
    
    
    
    - (void)Next;
    - (PTDigitalSignatureField*)Current;
    - (BOOL)HasNext;
    - (instancetype)init;
    @end

    Swift

    class PTDigitalSignatureFieldIterator : NSObject
  • FileSpec corresponds to the PDF file specification object.

    A PDF file can refer to the contents of another file by using a file specification, which can take either of the following forms:

    • A simple file specification gives just the name of the target file in a standard format, independent of the naming conventions of any particular file system.

    • A full file specification includes information related to one or more specific file systems.

    • A URL reference.

    Although the file designated by a file specification is normally external to the PDF file referring to it, it is also possible to embed the file allowing its contents to be stored or transmitted along with the PDF file. However, embedding a file does not change the presumption that it is external to (or separate from) the PDF file.

    For more details on file specifications, please refer to Section 3.10, ‘File Specifications’ in the PDF Reference Manual.

    See more

    Declaration

    Objective-C

    @interface PTFileSpec : NSObject

    Swift

    class PTFileSpec : NSObject
  • BorderStyle structure specifies the characteristics of the annotation’s border. The border is specified as a rounded rectangle.

    See more

    Declaration

    Objective-C

    @interface PTBorderStyle : NSObject

    Swift

    class PTBorderStyle : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTQuadPoint : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setP1: (PTPDFPoint*)value;
    - (PTPDFPoint*)getP1;
    - (void)setP2: (PTPDFPoint*)value;
    - (PTPDFPoint*)getP2;
    - (void)setP3: (PTPDFPoint*)value;
    - (PTPDFPoint*)getP3;
    - (void)setP4: (PTPDFPoint*)value;
    - (PTPDFPoint*)getP4;
    - (instancetype)init;- (instancetype)initWithP11: (PTPDFPoint*)p11 p22:  (PTPDFPoint*)p22 p33:  (PTPDFPoint*)p33 p44:  (PTPDFPoint*)p44;- (instancetype)initWithR: (PTPDFRect*)r;
    @end

    Swift

    class PTQuadPoint : NSObject
  • A destination defines a particular view of a document, consisting of the following:

    • The page of the document to be displayed
    • The location of the document window on that page
    • The magnification (zoom) factor to use when displaying the page

    Destinations may be associated with Bookmarks, Annotations, and Remote Go-To Actions.

    Destination is a utility class used to simplify work with PDF Destinations; Please refer to section 8.2.1 ‘Destinations’ in PDF Reference Manual for details.

    See more

    Declaration

    Objective-C

    @interface PTDestination : NSObject

    Swift

    class PTDestination : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTDiffOptions : NSObject
    {
    
    
    }
    
    
    
    
    - (BOOL)GetAddGroupAnnots;
    - (PTDiffOptions*)SetAddGroupAnnots: (BOOL)value;
    - (PTBlendMode)GetBlendMode;
    - (PTDiffOptions*)SetBlendMode: (PTBlendMode)value;
    - (PTColorPt*)GetColorA;
    - (PTDiffOptions*)SetColorA: (PTColorPt*)value;
    - (PTColorPt*)GetColorB;
    - (PTDiffOptions*)SetColorB: (PTColorPt*)value;
    - (instancetype)init;
    @end

    Swift

    class PTDiffOptions : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTKeyStrokeEventData : NSObject
    {
    
    
    }
    
    
    
    
    
    - (instancetype)initWithField_name: (NSString *)field_name current_value:  (NSString *)current_value change:  (NSString *)change selection_start:  (int)selection_start selection_end:  (int)selection_end;
    @end

    Swift

    class PTKeyStrokeEventData : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTKeyStrokeActionResult : NSObject
    {
    
    
    }
    
    
    
    
    - (BOOL)IsValid;
    - (NSString *)GetText;
    
    - (instancetype)initWithAction_result: (PTKeyStrokeActionResult*)action_result;
    @end

    Swift

    class PTKeyStrokeActionResult : NSObject
  • Actions are typically what happens when a user clicks on a link or bookmark.

    Instead of simply jumping to a destination in the document, an annotation or outline item can specify an action for the viewer application to perform, such as launching an application, playing a sound, or changing an annotation’s appearance state.

    Note

    Although the Action class provides utility functions for most commonly used action types, it is possible to read, write, and edit any action type using SDF API and dictionary entries described in Section 8.5 in the PDF Reference Manual.
    See more

    Declaration

    Objective-C

    @interface PTAction : NSObject

    Swift

    class PTAction : NSObject
  • ActionParameter is a class used to describe all the information needed to execute an action. In most cases only the action itself is necessary since the document can be inferred from associated SDF::Obj, however some actions particularly JavaScript actions on Field or Annot objects need access to the associated Field or Annot object.

    See more

    Declaration

    Objective-C

    @interface PTActionParameter : NSObject

    Swift

    class PTActionParameter : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTOCROptions : NSObject
    {
    
    
    }
    
    
    
    
    - (PTOCROptions*)AddIgnoreZonesForPage: (PTPDFRectCollection*)regions page_num:  (int)page_num;
    - (PTOCROptions*)AddLang: (NSString *)lang;
    - (PTOCROptions*)AddTextZonesForPage: (PTPDFRectCollection*)regions page_num:  (int)page_num;
    - (PTOCROptions*)AddDPI: (int)dpi;
    - (instancetype)init;
    @end

    Swift

    class PTOCROptions : NSObject
  • The class OCRModule. static interface to PDFTron SDKs OCR functionality

    See more

    Declaration

    Objective-C

    @interface PTOCRModule : NSObject

    Swift

    class PTOCRModule : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTCADConvertOptions : NSObject
    {
    
    
    }
    
    
    
    
    - (BOOL)GetAutoRotate;
    - (PTCADConvertOptions*)SetAutoRotate: (BOOL)value;
    - (BOOL)GetLineWeight;
    - (PTCADConvertOptions*)SetLineWeight: (BOOL)value;
    - (double)GetPageHeight;
    - (PTCADConvertOptions*)SetPageHeight: (double)value;
    - (double)GetPageWidth;
    - (PTCADConvertOptions*)SetPageWidth: (double)value;
    - (double)GetRasterDPI;
    - (PTCADConvertOptions*)SetRasterDPI: (double)value;
    - (PTCADConvertOptions*)AddSheets: (NSString *)value;
    - (instancetype)init;
    @end

    Swift

    class PTCADConvertOptions : NSObject
  • The class CADModule. static interface to PDFTron SDKs CAD functionality

    See more

    Declaration

    Objective-C

    @interface PTCADModule : NSObject

    Swift

    class PTCADModule : NSObject
  • An object representing a check box used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTCheckBoxWidget : PTWidget

    Swift

    class PTCheckBoxWidget : PTWidget
  • An object representing a combo box used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTComboBoxWidget : PTWidget

    Swift

    class PTComboBoxWidget : PTWidget
  • An object representing a List Box used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTListBoxWidget : PTWidget

    Swift

    class PTListBoxWidget : PTWidget
  • An object representing a push button used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTPushButtonWidget : PTWidget

    Swift

    class PTPushButtonWidget : PTWidget
  • An object representing a Radio Button used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTRadioButtonWidget : PTWidget

    Swift

    class PTRadioButtonWidget : PTWidget
  • An object representing a Group of Radio Buttons that can be used to create new Radio Buttons. If a group contains multiple buttons they will be connected.

    See more

    Declaration

    Objective-C

    @interface PTRadioButtonGroup : NSObject

    Swift

    class PTRadioButtonGroup : NSObject
  • An object representing a Signature used in a PDF Form. These Widgets can be signed directly, or signed using a DigitalSignatureField.

    See more

    Declaration

    Objective-C

    @interface PTSignatureWidget : PTWidget

    Swift

    class PTSignatureWidget : PTWidget
  • An object representing a Text Box used in a PDF Form.

    See more

    Declaration

    Objective-C

    @interface PTTextWidget : PTWidget

    Swift

    class PTTextWidget : PTWidget
  • A %PDF document may optionally display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of Bookmarks (sometimes called outline items), which serve as a ‘visual table of contents’ to display the document’s structure to the user.

    Each Bookmark has a title that appears on screen, and an Action that specifies what happens when a user clicks on the Bookmark. The typical action for a user-created Bookmark is to move to another location in the current document, although any action (see PDF::Action) can be specified.

    Bookmark is a utility class used to simplify work with %PDF bookmarks (or outlines; see section 8.2.2 ‘Document Outline’ in %PDF Reference Manual for more details).

    See more

    Declaration

    Objective-C

    @interface PTBookmark : NSObject

    Swift

    class PTBookmark : NSObject
  • ContentReplacer is a utility class for replacing content (text and images) in existing PDF (template) documents.

    Users can replace content in a PDF page using the following operations:

    • Replace an image that exists in a target rectangle with a replacement image.
    • Replace text that exists in a target rectangle with replacement text.
    • Replace all instances of a specially marked string with replacement string.

    The following code replaces an image in a target region. This code also replaces the text [NAME] and [JOB_TITLE] with John Smith and Software Developer respectively. Notice the square braces (‘[’ and ‘]’) on the target strings in the original PDFDoc. These square braces are not included in the actual function calls below, as they’re implicitly added.

     PDFDoc doc("../../TestFiles/BusinessCardTemplate.pdf");
     doc.InitSecurityHandler();
     ContentReplacer replacer;
     Page page = doc.GetPage(1);
     Image img = Image::Create(doc, "../../TestFiles/peppers.jpg");
     replacer.AddImage(page.GetMediaBox(), img.GetSDFObj());
     replacer.AddString("NAME", "John Smith");
     replacer.AddString("JOB_TITLE", "Software Developer");
     replacer.Process(page);
    
    See more

    Declaration

    Objective-C

    @interface PTContentReplacer : NSObject

    Swift

    class PTContentReplacer : NSObject
  • Contains the information required to draw the path. Contains an array of PathSegmentType Operators and corresponding path data Points. A point may be on or off (off points are control points). The meaning of a point depends on associated id (or segment type) in the path segment type array.

    See more

    Declaration

    Objective-C

    @interface PTPathData : NSObject

    Swift

    class PTPathData : NSObject
  • A font that is used to draw text on a page. It corresponds to a Font Resource in a PDF file. More than one page may reference the same Font object. A Font has a number of attributes, including an array of widths, the character encoding, and the font’s resource name.

    PDF document can contain several different types of fonts and Font class represents a single, flat interface around all PDF font types.

    There are two main classes of fonts in PDF: simple and composite fonts.

    Simple fonts are Type1, TrueType, and Type3 fonts. All simple fonts have the following properties:

    • Glyphs in the font are selected by single-byte character codes obtained from a string that is shown by the text-showing operators. Logically, these codes index into a table of 256 glyphs; the mapping from codes to glyphs is called the font’s encoding. Each font program has a built-in encoding. Under some circumstances, the encoding can be altered by means described in Section 5.5.5 Character Encoding in PDF Reference Manual.

    • Each glyph has a single set of metrics. Therefore simple fonts support only horizontal writing mode.

    A composite font is one whose glyphs are obtained from a font like object called a CIDFont (e.g. CIDType0Font and CIDType0Font). A composite font is represented by a font dictionary whose Subtype value is Type0. The Type 0 font is known as the root font, while its associated CIDFont is called its descendant. CID-keyed fonts provide a convenient and efficient method for defining multiple-byte character encodings and fonts with a large number of glyphs. These capabilities provide great flexibility for representing text in writing systems for languages with large character sets, such as Chinese, Japanese, and Korean (CJK).

    See more

    Declaration

    Objective-C

    @interface PTFont : NSObject

    Swift

    class PTFont : NSObject
  • Shading is a class that represents a flat interface around all PDF shading types:

    • In Function-based (type 1) shadings, the color at every point in the domain is defined by a specified mathematical function. The function need not be smooth or continuous. This is the most general of the available shading types, and is useful for shadings that cannot be adequately described with any of the other types.

    • Axial shadings (type 2) define a color blend along a line between two points, optionally extended beyond the boundary points by continuing the boundary colors.

    • Radial shadings (type 3) define a color blend that varies between two circles. Shadings of this type are commonly used to depict three-dimensional spheres and cones.

    • Free-form Gouraud-shaded triangle mesh shadings (type 4) and lattice Gouraud shadings (type 5) are commonly used to represent complex colored and shaded three-dimensional shapes. The area to be shaded is defined by a path composed entirely of triangles. The color at each vertex of the triangles is specified, and a technique known as Gouraud interpolation is used to color the interiors. The interpolation functions defining the shading may be linear or nonlinear.

    • Coons patch mesh shadings (type 6) are constructed from one or more color patches, each bounded by four cubic Bezier curves.

      A Coons patch generally has two independent aspects:

      • Colors are specified for each corner of the unit square, and bilinear interpolation is used to fill in colors over the entire unit square
      • Coordinates are mapped from the unit square into a four-sided patch whose sides are not necessarily linear. The mapping is continuous: the corners of the unit square map to corners of the patch and the sides of the unit square map to sides of the patch.
    • Tensor-product patch mesh shadings (type 7) are identical to type 6 (Coons mesh), except that they are based on a bicubic tensor-product patch defined by 16 control points, instead of the 12 control points that define a Coons patch. The shading Patterns dictionaries representing the two patch types differ only in the value of the Type entry and in the number of control points specified for each patch in the data stream. Although the Coons patch is more concise and easier to use, the tensor- product patch affords greater control over color mapping.

    See more

    Declaration

    Objective-C

    @interface PTShading : NSObject

    Swift

    class PTShading : NSObject
  • Patterns are quite general, and have many uses; for example, they can be used to create various graphical textures, such as weaves, brick walls, sunbursts, and similar geometrical and chromatic effects.

    Patterns are specified in a special family of color spaces named Pattern, whose ‘color values’ are PatternColor objects instead of the numeric component values used with other spaces. Therefore PatternColor is to pattern color space what is ColorPt to all other color spaces.

    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. This is called tiling the area.

    The pattern cell can include graphical elements such as filled areas, text, and sampled images. Its shape need not be rectangular, and the spacing of tiles can differ from the dimensions of the cell itself.

    The order in which individual tiles (instances of the cell) are painted is unspecified and unpredictable; it is inadvisable for the figures on adjacent tiles to overlap.

    See more

    Declaration

    Objective-C

    @interface PTPatternColor : NSObject

    Swift

    class PTPatternColor : NSObject
  • Element is the abstract interface used to access graphical elements used to build the display list.

    Just like many other classes in PDFNet (e.g. ColorSpace, Font, Annot, etc), Element class follows the composite design pattern. This means that all Elements are accessed through the same interface, but depending on the Element type (that can be obtained using GetType()), only methods related to that type can be called. For example, if GetType() returns e_image, it is illegal to call a method specific to another Element type (i.e. a call to a text specific GetTextData() will throw an Exception).

    See more

    Declaration

    Objective-C

    @interface PTElement : NSObject

    Swift

    class PTElement : NSObject
  • ElementBuilder is used to build new PDF::Elements (e.g. image, text, path, etc) from scratch. In conjunction with ElementWriter, ElementBuilder can be used to create new page content.

    Note

    Analogous to ElementReader, every call to ElementBuilder.Create? method destroys the Element currently associated with the builder and all previous Element pointers are invalidated.

    Note

    For C++ developers. Analogous to ElementReader, ElementBuilder is the owner of all Element objects it creates.

    See more

    Declaration

    Objective-C

    @interface PTElementBuilder : NSObject

    Swift

    class PTElementBuilder : NSObject
  • ElementReader can be used to parse and process content streams. ElementReader provides a convenient interface used to traverse the Element display list of a page. The display list representing graphical elements (such as text-runs, paths, images, shadings, forms, etc) is accessed using the intrinsic iterator. ElementReader automatically concatenates page contents spanning multiple streams and provides a mechanism to parse contents of sub-display lists (e.g. forms XObjects and Type3 fonts).

    A sample use case for ElementReader is given below:

     ...
     ElementReader reader;
     reader.Begin(page);
     for (Element element=reader.Next(); element; element = reader.Next()) // Read page contents
     {
       switch (element.GetType())   {
         case Element::e_path: { // Process path data...
             const double* data = element.GetPathPoints();
             int sz = element.GetPointCount();
         }
         break;
         case Element::e_text:
             // ...
         break;
       }
     }
     reader.End();
    

    For a full sample, please refer to ElementReader and ElementReaderAdvTest sample projects.

    See more

    Declaration

    Objective-C

    @interface PTElementReader : NSObject

    Swift

    class PTElementReader : NSObject
  • ElementWriter can be used to assemble and write new content to a page, Form XObject, Type3 Glyph stream, pattern stream, or any other content stream.

    See more

    Declaration

    Objective-C

    @interface PTElementWriter : NSObject

    Swift

    class PTElementWriter : NSObject
  • The class ExternalAnnotManager. A manager class attached to a PDFView that takes care of annotations from xfdf sources

    ExternalAnnotManager instances are created through the PDFView using PDFView.GetExternalAnnotManager()

    See more

    Declaration

    Objective-C

    @interface PTExternalAnnotManager : NSObject

    Swift

    class PTExternalAnnotManager : NSObject
  • Flattener is a optional PDFNet add-on that can be used to simplify and optimize existing PDF’s to render faster on devices with lower memory and speeds.

    PDF documents can frequently contain very complex page description (e.g. thousands of paths, different shadings, color spaces, blend modes, large images etc.) that may not be suitable for interactive viewing on mobile devices. Flattener can be used to speed-up PDF rendering on mobile devices and on the Web by simplifying page content (e.g. flattening complex graphics into images) while maintaining vector text whenever possible.

    By using the FlattenMode::e_simple option each page in the PDF will be reduced to a single background image, with the remaining text over top in vector format. Some text may still get flattened, in particular any text that is clipped, or underneath, other content that will be flattened.

    On the other hand the FlattenMode::e_fast will not flatten simple content, such as simple straight lines, nor will it flatten Type3 fonts.

    Note

    ‘Flattener’ is available as a separately licensable add-on to PDFNet core license or for use via Cloud API (http://www.pdftron.com/pdfnet/cloud).

    Note

    See ‘pdftron.PDF.Optimizer’ for alternate approach to optimize PDFs with focus on file size reduction.

    See more

    Declaration

    Objective-C

    @interface PTFlattener : NSObject

    Swift

    class PTFlattener : NSObject
  • LinkInfo is a utility class used to store information about links when used along with the SetUrlExtraction feature.

    See more

    Declaration

    Objective-C

    @interface PTLinkInfo : NSObject

    Swift

    class PTLinkInfo : NSObject
  • Image2RGB is a filter that can decompress and normalize any PDF image stream (e.g. monochrome, CMYK, etc) into a raw RGB pixel stream.

    See more

    Declaration

    Objective-C

    @interface PTImage2RGB : PTFilter

    Swift

    class PTImage2RGB : PTFilter
  • Image2RGBA is a filter that can decompress and normalize any PDF image stream (e.g. monochrome, CMYK, etc) into a raw RGBA pixel stream.

    See more

    Declaration

    Objective-C

    @interface PTImage2RGBA : PTFilter

    Swift

    class PTImage2RGBA : PTFilter
  • SWIG director's base class
    
    Contains virtual functions which match the signature of the PDFNet function pointers.
    

    Each virtual function has a matching static function calling it. User extends this class in the target language and overrides the function of interest. The static function is assigned to the function pointer.

    See more

    Declaration

    Objective-C

    @interface PTCallback : NSObject

    Swift

    class PTCallback : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTHighlight : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setPage_num: (int)value;
    - (int)getPage_num;
    - (void)setPosition: (int)value;
    - (int)getPosition;
    - (void)setLength: (int)value;
    - (int)getLength;
    - (instancetype)init;- (instancetype)initWithPg: (int)pg pos:  (int)pos len:  (int)len;
    @end

    Swift

    class PTHighlight : NSObject
  • Save the current Highlight information in the class to a file.

    See more

    Declaration

    Objective-C

    @interface PTHighlights : NSObject

    Swift

    class PTHighlights : NSObject

    Parameters

    file_name

    the name of the file to save to.

  • A class representing the current text selection.

    See more

    Declaration

    Objective-C

    @interface PTSelection : NSObject

    Swift

    class PTSelection : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTOptimizer : NSObject
    {
    
    
    }
    
    
    
    
    + (void)Optimize: (PTPDFDoc*)doc settings:  (PTOptimizerSettings*)settings;
    
    @end

    Swift

    class PTOptimizer : NSObject
  • A class that stores downsampling/recompression settings for color and grayscale images.

    See more

    Declaration

    Objective-C

    @interface PTImageSettings : NSObject

    Swift

    class PTImageSettings : NSObject
  • A class that stores image downsampling/recompression settings for monochrome images.

    See more

    Declaration

    Objective-C

    @interface PTMonoImageSettings : NSObject

    Swift

    class PTMonoImageSettings : NSObject
  • A class that stores image text optimization settings.

    See more

    Declaration

    Objective-C

    @interface PTTextSettings : NSObject

    Swift

    class PTTextSettings : NSObject
  • A class that stores settings for the optimizer

    See more

    Declaration

    Objective-C

    @interface PTOptimizerSettings : NSObject

    Swift

    class PTOptimizerSettings : NSObject
  • PDF page labels can be used to describe a page. This is used to allow for non-sequential page numbering or the addition of arbitrary labels for a page (such as the inclusion of Roman numerals at the beginning of a book). PDFNet PageLabel object can be used to specify the numbering style to use (for example, upper- or lower-case Roman, decimal, and so forth), the starting number for the first page, and an arbitrary prefix to be pre-appended to each number (for example, A- to generate A-1, A-2, A-3, and so forth.)

    PageLabel corresponds to the PDF Page Label object (Section 8.3.1, ‘Page Labels’ in the PDF Reference Manual.

    Each page in a PDF document is identified by an integer page index that expresses the page’s relative position within the document. In addition, a document may optionally define page labels to identify each page visually on the screen or in print. Page labels and page indices need not coincide: the indices are fixed, running consecutively through the document starting from 1 for the first page, but the labels can be specified in any way that is appropriate for the particular document. For example, if the document begins with 12 pages of front matter numbered in roman numerals and the remainder of the document is numbered in Arabic, the first page would have a page index of 1 and a page label of i, the twelfth page would have index 12 and label xii, and the thirteenth page would have index 13 and label 1.

    For purposes of page labeling, a document can be divided into labeling ranges, each of which is a series of consecutive pages using the same numbering system. Pages within a range are numbered sequentially in ascending order. A page’s label consists of a numeric portion based on its position within its labeling range, optionally preceded by a label prefix denoting the range itself. For example, the pages in an appendix might be labeled with decimal numeric portions prefixed with the string A- and the resulting page labels would be A-1, A-2,

    @note There is no default numbering style; if no ‘S’ (Style) entry is present, page labels consist solely of a label prefix with no numeric portion. For example, if the ‘P’ entry (Prefix) specifies the label prefix Appendix, each page is simply labeled Appendix with no page number. If the ‘P’ entry is also missing or empty, the page label is an empty string.

    Sample code (See PableLabelsTest sample project for examples):

     // Create a page labeling scheme that starts with the first page in
     // the document (page 1) and is using uppercase roman numbering
     // style.
     doc.SetPageLabel(1, PageLabel::Create(doc, PageLabel::e_roman_uppercase, "My Prefix ", 1));
    
     // Create a page labeling scheme that starts with the fourth page in
     // the document and is using decimal Arabic numbering style.
     // Also the numeric portion of the first label should start with number
     // 4 (otherwise the first label would be "My Prefix 1").
     PageLabel L2 = PageLabel::Create(doc, PageLabel::e_decimal, "My Prefix ", 4);
     doc.SetPageLabel(4, L2);
    
     // Create a page labeling scheme that starts with the seventh page in
     // the document and is using alphabetic numbering style. The numeric
     // portion of the first label should start with number 1.
     PageLabel L3 = PageLabel::Create(doc, PageLabel::e_alphabetic_uppercase, "My Prefix ", 1);
     doc.SetPageLabel(7, L3);
    
     // Read page labels from an existing PDF document.
     PageLabel label;
     for (int i=1; i<=doc.GetPageCount(); ++i) {
     label = doc.GetPageLabel(i);
     if (label.IsValid()) {
       UString title = label.GetLabelTitle(i);
     }
    
    
    See more

    Declaration

    Objective-C

    @interface PTPageLabel : NSObject

    Swift

    class PTPageLabel : NSObject
  • PageSet is a container of page numbers ordered following a linear sequence. The page numbers are integers and must be greater than zero. Duplicates are allowed.

    (NOTE: This is not a mathematical set)

    See more

    Declaration

    Objective-C

    @interface PTPageSet : NSObject

    Swift

    class PTPageSet : NSObject
  • PDFDocInfo is a high-level utility class that can be used to read and modify document’s metadata.

    See more

    Declaration

    Objective-C

    @interface PTPDFDocInfo : NSObject

    Swift

    class PTPDFDocInfo : NSObject
  • PDFDocViewPrefs is a high-level utility class that can be used to control the way the document is to be presented on the screen or in print.

    PDFDocViewPrefs class corresponds to PageMode, PageLayout, and ViewerPreferences entries in the document’s catalog. For more details please refer to section 8.1 ‘Viewer Preferences’ in PDF Reference Manual.

    See more

    Declaration

    Objective-C

    @interface PTPDFDocViewPrefs : NSObject

    Swift

    class PTPDFDocViewPrefs : NSObject
  • This class is used to store separations in PDFRasterize and PDFDraw

    See more

    Declaration

    Objective-C

    @interface PTSeparation : NSObject

    Swift

    class PTSeparation : NSObject
  • PDFRasterizer is a low-level PDF rasterizer.

    The main purpose of this class is to convert PDF pages to raster images (or bitmaps).

    Note

    PDFRasterizer is a relatively low-level class. If you need to convert PDF page to an image format or a Bitmap, consider using PDF::PDFDraw. Similarly, if you are building an interactive PDF viewing application you may want to use PDF::PDFView instead.
    See more

    Declaration

    Objective-C

    @interface PTPDFRasterizer : NSObject

    Swift

    class PTPDFRasterizer : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTViewerOptimizedOptions : NSObject
    {
    
    
    }
    
    
    
    
    - (void)SetThumbnailRenderingThreshold: (unsigned int)threshold;
    - (void)SetThumbnailSize: (unsigned int)size;
    - (void)SetOverprint: (PTOverprintPreviewMode)mode;
    - (instancetype)init;
    @end

    Swift

    class PTViewerOptimizedOptions : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTBitmapInfo : NSObject
    {
    
    
    }
    
    
    
    
    - (void)setWidth: (int)value;
    - (int)getWidth;
    - (void)setHeight: (int)value;
    - (int)getHeight;
    - (void)setStride: (int)value;
    - (int)getStride;
    - (void)setDpi: (double)value;
    - (double)getDpi;
    - (NSData*)GetBuffer;
    - (instancetype)initWithW: (int)w h:  (int)h s:  (int)s d:  (double)d b:  (NSString *)b;
    @end

    Swift

    class PTBitmapInfo : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTConversionOptions : NSObject
    {
    
    
    }
    
    
    
    
    - (instancetype)init;- (instancetype)initWithValue: (NSString *)value;
    @end

    Swift

    class PTConversionOptions : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTOfficeToPDFOptions : PTConversionOptions
    
    
    
    
    - (NSString *)GetLayoutResourcesPluginPath;
    - (PTOfficeToPDFOptions*)SetLayoutResourcesPluginPath: (NSString *)value;
    - (NSString *)GetResourceDocPath;
    - (PTOfficeToPDFOptions*)SetResourceDocPath: (NSString *)value;
    - (NSString *)GetSmartSubstitutionPluginPath;
    - (PTOfficeToPDFOptions*)SetSmartSubstitutionPluginPath: (NSString *)value;
    - (double)GetExcelDefaultCellBorderWidth;
    - (PTOfficeToPDFOptions*)SetExcelDefaultCellBorderWidth: (double)width;
    - (instancetype)init;
    @end

    Swift

    class PTOfficeToPDFOptions : PTConversionOptions
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTConversionMonitor : NSObject
    {
    
    
    }
    
    
    
    
    - (BOOL)Next;
    - (BOOL)Ready;
    - (unsigned int)Progress;
    - (PTFilter*)Filter;
    
    - (instancetype)init;
    @end

    Swift

    class PTConversionMonitor : NSObject
  • PDFView is a utility class that can be used for interactive rendering of PDF documents.

    In .NET environment PDFView is derived from System.Windows.Forms.Control and it can be used like a regular form (see PDFViewForm.cs in PDFView sample for C# for a concrete example).

    PDFView implements some essential features such as double-buffering, multi-threaded rendering, scrolling, zooming, and page navigation that are essential in interactive rendering applications (e.g. in client PDF viewing and editing applications).

    PDFView defines several coordinate spaces and it is important to understand their differences:

  • Page Space refers to the space in which a PDF page is defined. It is determined by a page itself and the origin is at the lower-left corner of the page. Note that Page Space is independent of how a page is viewed in PDFView and each page has its own Page space.

  • Canvas Space refers to the tightest axis-aligned bounding box of all the pages given the current page presentation mode in PDFView. For example, if the page presentation mode is e_single_continuous, all the pages are arranged vertically with one page in each row, and therefore the Canvas Space is rectangle with possibly large height value. For this reason, Canvas Space is also, like Page Space, independent of the zoom factor. Also note that since PDFView adds gaps between adjacent pages, the Canvas Space is larger than the space occupied by all the pages. The origin of the Canvas Space is located at the upper-left corner.

  • Screen Space (or Client Space) is the space occupied by PDFView and its origin is at the upper-left corner. Note that the virtual size of this space can extend beyond the visible region.

  • Scrollable Space is the virtual space within which PDFView can scroll. It is determined by the Canvas Space and the current zoom factor. Roughly speaking, the dimensions of the Scrollable Space is the dimensions of the Canvas Space timed by the zoom. Therefore, a large zoom factor will result in a larger Scrollable region given the same Canvas region. For this reason, Scrollable Space might also be referred to as Zoomed Canvas Space. Note that since PDFView adds gaps between pages in Canvas Space and these gaps are not scaled when rendered, the scrollable range is not exactly what the zoom factor times the Canvas range. For functions such as SetHScrollPos(), SetVScrollPos(), GetCanvasHeight(), and GetCanvasWidth(), it is the Scrollable Space that is involved.

  • Note

    PDFView is available on all platforms supported by PDFNet.

    PDFView is a utility class that can be used for interactive rendering of PDF documents.

    In .NET environment PDFView is derived from System.Windows.Forms.Control and it can be used like a regular form (see PDFViewForm.cs in PDFView sample for C# for a concrete example).

    PDFView implements some essential features such as double-buffering, multi-threaded rendering, scrolling, zooming, and page navigation that are essential in interactive rendering applications (e.g. in client PDF viewing and editing applications).

    PDFView defines several coordinate spaces and it is important to understand their differences:

  • Page Space refers to the space in which a PDF page is defined. It is determined by a page itself and the origin is at the lower-left corner of the page. Note that Page Space is independent of how a page is viewed in PDFView and each page has its own Page space.

  • Canvas Space refers to the tightest axis-aligned bounding box of all the pages given the current page presentation mode in PDFView. For example, if the page presentation mode is e_single_continuous, all the pages are arranged vertically with one page in each row, and therefore the Canvas Space is rectangle with possibly large height value. For this reason, Canvas Space is also, like Page Space, independent of the zoom factor. Also note that since PDFView adds gaps between adjacent pages, the Canvas Space is larger than the space occupied by all the pages. The origin of the Canvas Space is located at the upper-left corner.

  • Screen Space (or Client Space) is the space occupied by PDFView and its origin is at the upper-left corner. Note that the virtual size of this space can extend beyond the visible region.

  • Scrollable Space is the virtual space within which PDFView can scroll. It is determined by the Canvas Space and the current zoom factor. Roughly speaking, the dimensions of the Scrollable Space is the dimensions of the Canvas Space timed by the zoom. Therefore, a large zoom factor will result in a larger Scrollable region given the same Canvas region. For this reason, Scrollable Space might also be referred to as Zoomed Canvas Space. Note that since PDFView adds gaps between pages in Canvas Space and these gaps are not scaled when rendered, the scrollable range is not exactly what the zoom factor times the Canvas range. For functions such as SetHScrollPos(), SetVScrollPos(), GetCanvasHeight(), and GetCanvasWidth(), it is the Scrollable Space that is involved.

  • Note

    PDFView is available on all platforms supported by PDFNet.

    See more

    Declaration

    Objective-C

    @interface PTPDFView : NSObject

    Swift

    class PTPDFView : NSObject
  • Stamper is a utility class that can be used to stamp PDF pages with text, images, or vector art (including another PDF page) in only a few lines of code.

    Although Stamper is very simple to use compared to ElementBuilder/ElementWriter it is not as powerful or flexible. In case you need full control over PDF creation use ElementBuilder/ElementWriter to add new content to existing PDF pages as shown in the ElementBuilder sample project.

    See more

    Declaration

    Objective-C

    @interface PTStamper : NSObject

    Swift

    class PTStamper : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTTextExtractor : NSObject
    {
    
    
    }
    
    
    
    
    - (void)Begin: (PTPage*)page clip_ptr:  (PTPDFRect*)clip_ptr flags:  (unsigned int)flags;
    - (int)GetWordCount;
    - (void)SetRightToLeftLanguage: (BOOL)rtl;
    - (BOOL)GetRightToLeftLanguage;
    - (NSString *)GetAsText: (BOOL)dehyphen;
    - (NSString *)GetTextUnderAnnot: (PTAnnot*)annot;
    - (NSString *)GetAsXML: (unsigned int)xml_output_flags;
    - (int)GetNumLines;
    - (PTTextExtractorLine*)GetFirstLine;
    
    - (instancetype)init;
    @end

    Swift

    class PTTextExtractor : NSObject
  • A class representing predominant text style associated with a given Line, a Word, or a Glyph. The class includes information about the font, font size, font styles, text color, etc.

    See more

    Declaration

    Objective-C

    @interface PTTextExtractorStyle : NSObject

    Swift

    class PTTextExtractorStyle : NSObject
  • TextExtractor::Word object represents a word on a PDF page. Each word contains a sequence of characters in one or more styles (see TextExtractor::Style).

    See more

    Declaration

    Objective-C

    @interface PTWord : NSObject

    Swift

    class PTWord : NSObject
  • TextExtractor::Line object represents a line of text on a PDF page. Each line consists of a sequence of words, and each words in one or more styles.

    See more

    Declaration

    Objective-C

    @interface PTTextExtractorLine : NSObject

    Swift

    class PTTextExtractorLine : NSObject
  • The class WebFontDownloader. static interface to control the behaviour of PDFNet web font downloading

    See more

    Declaration

    Objective-C

    @interface PTWebFontDownloader : NSObject

    Swift

    class PTWebFontDownloader : NSObject
  • The class PDFDocGenerator. A collection of static methods to create blank documents

    No notes :(

    See more

    Declaration

    Objective-C

    @interface PTPDFDocGenerator : NSObject

    Swift

    class PTPDFDocGenerator : NSObject
  • ReflowProcessor is a processor that manages the requests of converting PDF page documents to reflow documents as HTML files. The output reflowable HTML file is identified by the requested page itself. For each PDF document that at least one of its page is requested for converting to reflow, a folder is created in cache directory. The folder name will be set to a unique ID of the PDF document (obtained from PDFUtil::GetUniqueIdString). Also, the output HTML file is obtained by the page object number. For example, the output HTML path of a PDF page with document ID of 2740180447,229945,WT1NOmJhyyH9xNqwbEbbOg== and object number of 123 will be ../trn_reflowcache/2740180447,229945,WT1NOmJhyyH9xNqwbEbbOg==/123.html

    The cache is placed in the sub-directory ‘trn_reflowcache’ of the PDFNet Resources folder, which can be set by calling PDFNet::SetPersistentCachePath. In the case the PersistentCachePath is not set the HTML files will be stored in the system temp path (PDFNet::GetSystemTempPath()). The cache will be used by any PDFNet process that uses the resource path. If more than one PDFNet process is running concurrently, the first process to acquire a lock on the cache will use it. Subsequent processes will not read or modify the cache.

    See more

    Declaration

    Objective-C

    @interface PTReflowProcessor : NSObject

    Swift

    class PTReflowProcessor : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTRedactor : NSObject
    {
    
    
    }
    
    
    
    
    + (void)Redact: (PTPDFDoc*)doc red_arr:  (PTVectorRedaction*)red_arr app:  (PTAppearance*)app ext_neg_mode:  (BOOL)ext_neg_mode page_coord_sys:  (BOOL)page_coord_sys;
    - (instancetype)init;
    @end

    Swift

    class PTRedactor : NSObject
  • A redaction annotation (PDF 1.7) identifies content that is intended to be removed from the document. The intent of redaction annotations is to enable the following: a)Content identification. A user applies redact annotations that specify the pieces or regions of content that should be removed. Up until the next step is performed, the user can see, move and redefine these annotations. b)Content removal. The user instructs the viewer application to apply the redact annotations, after which the content in the area specified by the redact annotations is removed. In the removed content’s place, some marking appears to indicate the area has been redacted. Also, the redact annotations are removed from the PDF document. RedactionAnnot annotations provide a mechanism for the first step in the redaction process (content identification). This allows content to be marked for redaction in a non-destructive way, thus enabling a review process for evaluating potential redactions prior to removing the specified content. RedactionAnnot annotations shall provide enough information to be used in the second phase of the redaction process (content removal). This phase is application-specific and requires the conforming reader to remove all content identified by the redaction annotation, as well as the annotation itself. Conforming readers that support redaction annotations shall provide a mechanism for applying content removal, and they shall remove all traces of the specified content. If a portion of an image is contained in a redaction region, that portion of the image data shall be destroyed; clipping or image masks shall not be used to hide that data. Such conforming readers shall also be diligent in their consideration of all content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.

    See more

    Declaration

    Objective-C

    @interface PTRedaction : NSObject

    Swift

    class PTRedaction : NSObject
  • Class used to customize the appearance of the optional redaction overlay.

    See more

    Declaration

    Objective-C

    @interface PTAppearance : NSObject

    Swift

    class PTAppearance : NSObject
  • The PTPrint class handles preparing a PTPDFDoc for printing with a system UIPrintInteractionController.

    See more

    Declaration

    Objective-C

    @interface PTPrint : NSObject <UIPrintInteractionControllerDelegate>

    Swift

    class PTPrint : NSObject, UIPrintInteractionControllerDelegate
  • The PTAnalyticsManager class dispatches analytics events to registered handlers conforming to the PTAnalyticsHandler protocol. Each event sent to an analytics manager is dispatched to all registered handlers capable of handling the event.

    See more

    Declaration

    Objective-C

    @interface PTAnalyticsManager : NSObject <PTAnalyticsHandler>

    Swift

    class PTAnalyticsManager : NSObject, PTAnalyticsHandler
  • An object that manages the user bookmarks inside PDF documents. User bookmarks can be created with the PTUserBookmark class and stored inside a PTPDFDoc with a PTBookmarkManager instance.

    See more

    Declaration

    Objective-C

    @interface PTBookmarkManager : NSObject

    Swift

    class PTBookmarkManager : NSObject
  • The PTCollaborationAnnotationViewController displays a list of all annotations in a collaboration session. The list will contain any comments that have been added to the annotations, and selecting an annotation will scroll the PTPDFViewCtrl to the position of the annotation.

    See more

    Declaration

    Objective-C

    @interface PTCollaborationAnnotationViewController
        : UITableViewController <PTOverridable>

    Swift

    class PTCollaborationAnnotationViewController : UITableViewController, PTOverridable
  • A subclass of the PTDocumentViewController that will synchronize annotations between the device and central server.

    The implementation is minimal:

    1. It connects the PTCollaborationDocumentViewController.toolManager.collaborationManger and the PTCollaborationServerCommunication service.

    2. It does not allow the user to select annotations where the author of the annotation does not match the user that is logged in to the PTCollaborationServerCommunication service.

    See more

    Declaration

    Objective-C

    @interface PTCollaborationDocumentViewController : PTDocumentViewController

    Swift

    class PTCollaborationDocumentViewController : PTDocumentViewController
  • The object that is responsible for sending local changes to the remote server, and for receiving remote changes from the server.

    See more

    Declaration

    Objective-C

    @interface PTCollaborationManager : NSObject

    Swift

    class PTCollaborationManager : NSObject
  • The PTDiffViewController class provides functionality to produce a document representing the visual difference between two documents. Instances of this class must be embedded inside a UINavigationController.

    See more

    Declaration

    Objective-C

    @interface PTDiffViewController : UIViewController

    Swift

    class PTDiffViewController : UIViewController
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTDocumentViewSettings : NSObject <NSCoding, NSCopying>
    
    - (instancetype)init NS_DESIGNATED_INITIALIZER;
    - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
    
    @property (nonatomic, assign) TrnPagePresentationMode pagePresentationMode;
    @property (nonatomic, assign, getter=isReflowEnabled) BOOL reflowEnabled;
    
    @property (nonatomic, assign) PTColorPostProcessMode colorPostProcessMode;
    @property (nonatomic, strong, nullable) UIColor *colorPostProcessWhiteColor;
    @property (nonatomic, strong, nullable) UIColor *colorPostProcessBlackColor;
    
    @property (nonatomic, assign, getter=isNightModeEnabled) BOOL nightModeEnabled;
    
    @property (nonatomic, assign) PTRotate pageRotation;
    
    @end

    Swift

    class PTDocumentViewSettings : NSObject, NSCoding, NSCopying
  • The PTFileAttachmentHandler class handles file attachment annotations. It can be used to export file attachment annotations from a document.

    See more

    Declaration

    Objective-C

    @interface PTFileAttachmentHandler : NSObject

    Swift

    class PTFileAttachmentHandler : NSObject
  • A PTMeasurementScale is used to describe a measurement’s conversion factors.

    See more

    Declaration

    Objective-C

    @interface PTMeasurementScale : NSObject <NSCoding>

    Swift

    class PTMeasurementScale : NSObject, NSCoding
  • The PTLayerInfo class encapsulates a single Optional Content Group and its visibility in the current context.

    See more

    Declaration

    Objective-C

    @interface PTLayerInfo : NSObject

    Swift

    class PTLayerInfo : NSObject
  • The PTPDFLayerViewController class displays a list of the document’s Optional Content Groups (OCGs), also known as layers.

    The visibility of each layer can be toggled on or off using this control.

    See more

    Declaration

    Objective-C

    @interface PTPDFLayerViewController : UITableViewController <PTOverridable>

    Swift

    class PTPDFLayerViewController : UITableViewController, PTOverridable
  • Utilities for creating PTPDFDoc objects.

    See more

    Declaration

    Objective-C

    @interface PTPDFTronUtil : NSObject

    Swift

    class PTPDFTronUtil : NSObject
  • Displays a control for adding blank pages. Allows the user to add pages with various page background templates such as line, grid, graph, and music.

    See more

    Declaration

    Objective-C

    @interface PTPageTemplateViewController : UITableViewController <PTOverridable>

    Swift

    class PTPageTemplateViewController : UITableViewController, PTOverridable
  • A PTThumbnailSliderView object shows a set of page thumbnails for a PTPDFViewCtrl‘s current document. The view also acts similar to a UISlider control, allowing the current page of the associated PTPDFViewCtrl to be changed with tap, pan, and long-press gestures on the pages.

    See more

    Declaration

    Objective-C

    @interface PTThumbnailSliderView
        : UIView <PTOverridable, UICollectionViewDataSource,
                  UICollectionViewDelegate>

    Swift

    class PTThumbnailSliderView : UIView, PTOverridable, UICollectionViewDataSource, UICollectionViewDelegate
  • A class that manages user prefrences.

    The settings in this class are use by the PTDocumentViewController to control its behaviour, except as noted in the documentation for each setting.

    See more

    Declaration

    Objective-C

    @interface PTToolsSettingsManager : NSObject

    Swift

    class PTToolsSettingsManager : NSObject
  • The PTUndoRedoManager class is responsible for managing the undo/redo chain of a PTPDFViewCtrl and the NSUndoManager of its toolManager.

    See more

    Declaration

    Objective-C

    @interface PTUndoRedoManager : NSObject

    Swift

    class PTUndoRedoManager : NSObject