litePDF C++ interface  1.3.1
Classes | Typedefs | Enumerations | Variables
litePDF Namespace Reference

Classes

class  TLitePDFException
 
class  TLitePDF
 

Typedefs

typedef void(__stdcall * MLitePDFErrorEvent )(unsigned int code, const char *msg, void *user_data)
 
typedef void(__stdcall * TLitePDFAppendSignatureDataFunc )(const char *bytes, unsigned int bytes_len, void *user_data)
 
typedef void(__stdcall * TLitePDFFinishSignatureFunc )(char *signature, unsigned int *signature_len, void *user_data)
 

Enumerations

enum  TLitePDFUnit {
  LitePDFUnit_Unknown = 0, LitePDFUnit_mm = 1, LitePDFUnit_10th_mm = 2, LitePDFUnit_100th_mm = 3,
  LitePDFUnit_1000th_mm = 4, LitePDFUnit_inch = 5, LitePDFUnit_10th_inch = 6, LitePDFUnit_100th_inch = 7,
  LitePDFUnit_1000th_inch = 8
}
 
enum  TLitePDFDrawFlags {
  LitePDFDrawFlag_None = 0, LitePDFDrawFlag_EmbedFontsNone = (1 << 4), LitePDFDrawFlag_EmbedFontsComplete = (1 << 0), LitePDFDrawFlag_EmbedFontsSubset = (1 << 1),
  LitePDFDrawFlag_SubstituteFonts = (1 << 2), LitePDFDrawFlag_CompressImagesWithJPEG = (1 << 3)
}
 
enum  TLitePDFEncryptPermission {
  LitePDFEncryptPermission_None = 0x0, LitePDFEncryptPermission_Print = 0x00000004, LitePDFEncryptPermission_Edit = 0x00000008, LitePDFEncryptPermission_Copy = 0x00000010,
  LitePDFEncryptPermission_EditNotes = 0x00000020, LitePDFEncryptPermission_FillAndSign = 0x00000100, LitePDFEncryptPermission_Accessible = 0x00000200, LitePDFEncryptPermission_DocAssembly = 0x00000400,
  LitePDFEncryptPermission_HighPrint = 0x00000800, LitePDFEncryptPermission_All
}
 
enum  TLitePDFEncryptAlgorithm {
  LitePDFEncryptAlgorithm_None = 0, LitePDFEncryptAlgorithm_RC4V1 = 1, LitePDFEncryptAlgorithm_RC4V2 = 2, LitePDFEncryptAlgorithm_AESV2 = 4,
  LitePDFEncryptAlgorithm_AESV3 = 8
}
 
enum  TLitePDFAnnotationFlags {
  LitePDFAnnotationFlag_None = 0x0000, LitePDFAnnotationFlag_Invisible = 0x0001, LitePDFAnnotationFlag_Hidden = 0x0002, LitePDFAnnotationFlag_Print = 0x0004,
  LitePDFAnnotationFlag_NoZoom = 0x0008, LitePDFAnnotationFlag_NoRotate = 0x0010, LitePDFAnnotationFlag_NoView = 0x0020, LitePDFAnnotationFlag_Readonly = 0x0040,
  LitePDFAnnotationFlag_Locked = 0x0080, LitePDFAnnotationFlag_ToggleNoView = 0x0100, LitePDFAnnotationFlag_LockedContents = 0x0200
}
 
enum  TLitePDFAppearance { LitePDFAppearance_Normal = 0, LitePDFAppearance_Rollover = 1, LitePDFAppearance_Down = 2 }
 
enum  TLitePDFBookmarkFlags { LitePDFBookmarkFlag_None = 0x0000, LitePDFBookmarkFlag_Italic = 0x0001, LitePDFBookmarkFlag_Bold = 0x0002 }
 

Variables

const char * LitePDFAuthorizationKey
 

Typedef Documentation

typedef void(__stdcall * litePDF::MLitePDFErrorEvent)(unsigned int code, const char *msg, void *user_data)
typedef void(__stdcall * litePDF::TLitePDFAppendSignatureDataFunc)(const char *bytes, unsigned int bytes_len, void *user_data)

The function is used within TLitePDF::SaveToFileWithSignManual and TLitePDF::SaveToDataWithSignManual. It is called called when more data should be added to hash computation.

typedef void(__stdcall * litePDF::TLitePDFFinishSignatureFunc)(char *signature, unsigned int *signature_len, void *user_data)

The function is used within TLitePDF::SaveToFileWithSignManual and TLitePDF::SaveToDataWithSignManual. It is called when all the data are processed, and the signature value is required. The signature_len contains size of the signature buffer. The callback is responsible to populate signature and signature_len with correct values. Set signature_len to zero on any error. Note the callback is called only once.

Enumeration Type Documentation

Enumerator
LitePDFAnnotationFlag_None 

Default annotation flags

LitePDFAnnotationFlag_Invisible 

Do not show nonstandard annotation if there is no annotation handler available

LitePDFAnnotationFlag_Hidden 

Do not allow show, print or interact with the annotation

LitePDFAnnotationFlag_Print 

Print the annotation

LitePDFAnnotationFlag_NoZoom 

Do not scale the annotation's appearance to match the magnification of the page

LitePDFAnnotationFlag_NoRotate 

Do not rotate the annotation's appearance to match the rotation of the page

LitePDFAnnotationFlag_NoView 

Do not display the annotation on the screen or allow it to interact with the user

LitePDFAnnotationFlag_Readonly 

Do not allow the annotation to interact with the user

LitePDFAnnotationFlag_Locked 

Do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user

LitePDFAnnotationFlag_ToggleNoView 

Invert the interpretation of the NoView flag for certain events

LitePDFAnnotationFlag_LockedContents 

Do not allow the contents of the annotation to be modified by the user

Enumerator
LitePDFAppearance_Normal 

Normal appearance

LitePDFAppearance_Rollover 

Rollover appearance; the default is the normal appearance

LitePDFAppearance_Down 

Down appearance; the default is the normal appearance

Enumerator
LitePDFBookmarkFlag_None 

Default bookmark flags

LitePDFBookmarkFlag_Italic 

Show bookmark title as an italic text

LitePDFBookmarkFlag_Bold 

Show bookmark title as a bold text

Enumerator
LitePDFDrawFlag_None 

None draw flags

LitePDFDrawFlag_EmbedFontsNone 

Do not embed any fonts into resulting PDF.

Note
: Fonts' subset is embeded by default, if none of the LitePDFDrawFlag_EmbedFontsNone, LitePDFDrawFlag_EmbedFontsComplete, LitePDFDrawFlag_EmbedFontsSubset, flags is defined; the LitePDFDrawFlag_EmbedFontsNone is to override default font embedding. The reason for this default embedding is due to PDF readers not showing correct fonts when they are not part of the PDF file.
See Also
LitePDFDrawFlag_EmbedFontsComplete, LitePDFDrawFlag_EmbedFontsSubset
LitePDFDrawFlag_EmbedFontsComplete 

Embed complete fonts into resulting PDF;

See Also
LitePDFDrawFlag_EmbedFontsSubset, LitePDFDrawFlag_EmbedFontsNone
LitePDFDrawFlag_EmbedFontsSubset 

Embed only subset of the fonts, aka used letters; this flag is used before LitePDFDrawFlag_EmbedFontsComplete;

See Also
LitePDFDrawFlag_EmbedFontsNone
LitePDFDrawFlag_SubstituteFonts 

Substitute fonts with base PDF fonts, if possible

LitePDFDrawFlag_CompressImagesWithJPEG 

Compress images with JPEG compression, to get smaller PDF document; this is used only for RGB images

Enumerator
LitePDFEncryptAlgorithm_None 

No encryption algorithm; it can be used only when unsetting prepared encryption

LitePDFEncryptAlgorithm_RC4V1 

RC4 Version 1 encryption using a 40bit key

LitePDFEncryptAlgorithm_RC4V2 

RC4 Version 2 encryption using a 128bit key

LitePDFEncryptAlgorithm_AESV2 

AES encryption with a 128 bit key (PDF1.6)

LitePDFEncryptAlgorithm_AESV3 

AES encryption with a 256 bit key (PDF1.7 extension 3)

Enumerator
LitePDFEncryptPermission_None 

Nothing from the rest is allowed

LitePDFEncryptPermission_Print 

Allow printing the document

LitePDFEncryptPermission_Edit 

Allow modifying the document besides annotations, form fields or changing pages

LitePDFEncryptPermission_Copy 

Allow text and graphic extraction

LitePDFEncryptPermission_EditNotes 

Add or modify text annotations or form fields (if ePdfPermissions_Edit is set also allow to create interactive form fields including signature)

LitePDFEncryptPermission_FillAndSign 

Fill in existing form or signature fields

LitePDFEncryptPermission_Accessible 

Extract text and graphics to support user with disabilities

LitePDFEncryptPermission_DocAssembly 

Assemble the document: insert, create, rotate delete pages or add bookmarks

LitePDFEncryptPermission_HighPrint 

Print a high resolution version of the document

LitePDFEncryptPermission_All 

Shortcut for all permissions

Enumerator
LitePDFUnit_Unknown 

Unknown unit; usually used to indicate an error

LitePDFUnit_mm 

Millimeters unit

LitePDFUnit_10th_mm 

1/10th of a millimeter unit; 5 mm is value 50

LitePDFUnit_100th_mm 

1/100th of a millimeter unit; 5 mm is value 500

LitePDFUnit_1000th_mm 

1/1000th of a millimeter unit; 5 mm is value 5000

LitePDFUnit_inch 

Inch unit

LitePDFUnit_10th_inch 

1/10th of an inch unit; 5" is value 50

LitePDFUnit_100th_inch 

1/100th of an inch unit; 5" is value 500

LitePDFUnit_1000th_inch 

1/1000th of an inch unit; 5" is value 5000

Variable Documentation

const char* litePDF::LitePDFAuthorizationKey

assign your litePDF authorization key to this variable