PDFix SDK  5.0.27
Pdfix Struct Referenceabstract

Pdfix class. More...

Public Member Functions

virtual void Destroy ()=0
 Destroys Pdfix resources. More...
 
virtual bool Authorize (const wchar_t *email, const wchar_t *serial_number)=0
 Authorizes Pdfix. More...
 
virtual bool IsAuthorized ()=0
 Returns authorization state. More...
 
virtual bool IsAuthorizedPlatform (PdfAuthPlatform platform)=0
 Returns authorization state. More...
 
virtual bool IsAuthorizedOption (PdfAuthOption option)=0
 Returns authorization state. More...
 
virtual int GetErrorType ()=0
 
virtual const char * GetError ()=0
 
virtual void SetError (int type, const char *error)=0
 Sets the latest error message to the library. More...
 
virtual int GetVersionMajor ()=0
 
virtual int GetVersionMinor ()=0
 
virtual int GetVersionPatch ()=0
 
virtual PdfDocOpenDoc (const wchar_t *path, const wchar_t *password)=0
 
virtual PdfDocOpenDocFromStream (PsStream *stream, const wchar_t *password)=0
 
virtual PdfDigSigCreateDigSig ()=0
 
virtual PdfCustomDigSigCreateCustomDigSig ()=0
 
virtual PsRegexCreateRegex ()=0
 
virtual PsFileStreamCreateFileStream (const wchar_t *path, PsFileMode mode)=0
 
virtual PsMemoryStreamCreateMemStream ()=0
 
virtual PsProcStreamCreateCustomStream (_callback_ PsStreamProc read_proc, PsStreamData client_data)=0
 
virtual bool RegisterEvent (PdfEventType type, _callback_ PdfEventProc proc, void *data)=0
 Registers a user-supplied procedure to call when the specified event occurs. More...
 
virtual bool UnregisterEvent (PdfEventType type, PdfEventProc proc, void *data)=0
 
virtual PsImageCreateImage (int width, int height, PsImageDIBFormat format)=0
 
virtual void RegisterPlugin (PdfixPlugin *plugin, const wchar_t *name)=0
 
virtual PdfixPluginGetPluginByName (const wchar_t *name)=0
 
virtual PsEventGetEvent ()=0
 

Detailed Description

Pdfix class.

Pdfix loads and unloads library. It initialized all necessary resources and also takes care about releasing it.

Member Function Documentation

◆ Authorize()

virtual bool Pdfix::Authorize ( const wchar_t *  email,
const wchar_t *  serial_number 
)
pure virtual

Authorizes Pdfix.

Returns
true if Pdfix was authorized successfuly, false otherwise.

◆ CreateCustomDigSig()

virtual PdfCustomDigSig* Pdfix::CreateCustomDigSig ( )
pure virtual

Creates a new PdfCustomDigSig object. Call PdfDigSig::Destroy method to release resources.


Returns
Initialized PdfCustomDigSig object.
See also
PdfDigSig::Destroy

◆ CreateCustomStream()

virtual PsProcStream* Pdfix::CreateCustomStream ( _callback_ PsStreamProc  read_proc,
PsStreamData  client_data 
)
pure virtual

Creates a new read-only PsStream with arbitrary data-producing procedure. Call PsStream::Destroy to release all stream resources.


Parameters
read_procData producing procedure
proc_stmPointer to user object which is provided to provided PsStreamProc
Returns
Initialized PsStream object.
See also
PsStream::Destroy

◆ CreateDigSig()

virtual PdfDigSig* Pdfix::CreateDigSig ( )
pure virtual

Creates a new PdfDigSig object. Call PdfDigSig::Destroy method to release resources.


Returns
Initialized PdfDigSig object.
See also
PdfDigSig::Destroy

◆ CreateFileStream()

virtual PsFileStream* Pdfix::CreateFileStream ( const wchar_t *  path,
PsFileMode  mode 
)
pure virtual

Creates a new read-only or write PsStream from PsFile. Call PsStream::Destroy to release all stream resources.


Parameters
pathPath to the file that PsStream needs to be created from.
modeFile open mode.
Returns
Initialized PsStream object.
See also
PsStream::Destroy

◆ CreateImage()

virtual PsImage* Pdfix::CreateImage ( int  width,
int  height,
PsImageDIBFormat  format 
)
pure virtual

Creates a new PsImage object. Call PsImage::Destroy to release image resources.


Parameters
widthRequested image width.
heightRequested image heught.
formatRequested image DIB format.
Returns
Initialized PsImage object.
See also
PsImage::Destroy

◆ CreateMemStream()

virtual PsMemoryStream* Pdfix::CreateMemStream ( )
pure virtual

Creates a new mempry operating PsStream. Call PsStream::Destroy to release all stream resources.


Returns
Initialized PsStream object.
See also
PsStream::Destroy

◆ CreateRegex()

virtual PsRegex* Pdfix::CreateRegex ( )
pure virtual

Creates a new PsRegex object. Call PsRegex::Destroy to release all regex resources.


Returns
Initialized PsRegex object.
See also
PsRegex::Destroy

◆ Destroy()

virtual void Pdfix::Destroy ( )
pure virtual

Destroys Pdfix resources.

See also
Pdfix::CreatePdfix

◆ GetError()

virtual const char* Pdfix::GetError ( )
pure virtual

Returns the latest error message from the library. The error message is set each time, when any library method fails.


Returns
The last error, empty string otherwise.

◆ GetErrorType()

virtual int Pdfix::GetErrorType ( )
pure virtual

Returns the latest error type from the library. The error type is set each time, when any library method fails.


Returns
The last error type.

◆ GetEvent()

virtual PsEvent* Pdfix::GetEvent ( )
pure virtual

Get the object of current event. Method to retrieve the event object related with the notification.


Returns
Initialized PsEvent object.

◆ GetPluginByName()

virtual PdfixPlugin* Pdfix::GetPluginByName ( const wchar_t *  name)
pure virtual

Get plugin by name. Method to retrieve the plugin by name.


Parameters
namePlugin registration name
See also
Pdfix::GetPluginByName

◆ GetVersionMajor()

virtual int Pdfix::GetVersionMajor ( )
pure virtual

Returns the major version. This is the first integer in a version number and is increased whenever significant changes are made.


Returns
The major version number.

◆ GetVersionMinor()

virtual int Pdfix::GetVersionMinor ( )
pure virtual

Returns the minor version. This is the second integer in a compound version number. This is normally set to 0 after each major release and increased whenever smaller features or significant bug fixes have been added.


Returns
The minor version number.

◆ GetVersionPatch()

virtual int Pdfix::GetVersionPatch ( )
pure virtual

Returns the patch version. The (optional) third integer is the patch number, sometimes also called the revision number. Changes in patch number should imply no change to the actual API interface, only changes to the behavior of the API.


Returns
The patch version number.

◆ IsAuthorized()

virtual bool Pdfix::IsAuthorized ( )
pure virtual

Returns authorization state.

Returns
true if PDFix was authorized, false othervise.

◆ IsAuthorizedOption()

virtual bool Pdfix::IsAuthorizedOption ( PdfAuthOption  option)
pure virtual

Returns authorization state.

Returns
true if PDFix was authorized for this option, false othervise.

◆ IsAuthorizedPlatform()

virtual bool Pdfix::IsAuthorizedPlatform ( PdfAuthPlatform  platform)
pure virtual

Returns authorization state.

Returns
true if PDFix was authorized for this platform, false othervise.

◆ OpenDoc()

virtual PdfDoc* Pdfix::OpenDoc ( const wchar_t *  path,
const wchar_t *  password 
)
pure virtual

Opens the specified document. If the document is already open, returns a reference to the already opened PdfDoc. NOTE: You must call PdfDoc::Close once for every successful open.


Parameters
pathPath to the file.
passwordFile password.
Returns
The newly created document or null.
See also
Close

◆ OpenDocFromStream()

virtual PdfDoc* Pdfix::OpenDocFromStream ( PsStream stream,
const wchar_t *  password 
)
pure virtual

Opens the specified document from memory. If the document is already open, returns a reference to the already opened PdfDoc. You must call PdfDoc::Close once for every successful open.


Parameters
streamPsStream object.
passwordFile password.
Returns
The newly created document or null.
See also
Close

◆ RegisterEvent()

virtual bool Pdfix::RegisterEvent ( PdfEventType  type,
_callback_ PdfEventProc  proc,
void *  data 
)
pure virtual

Registers a user-supplied procedure to call when the specified event occurs.

Parameters
typeThe event type.
procA user-supplied callback to call when the event occurs.
dataA pointer to user-supplied data to pass to proc each time it is called.
Returns
true if event was registered, false otherwise. Sample RegisterEvent

◆ RegisterPlugin()

virtual void Pdfix::RegisterPlugin ( PdfixPlugin plugin,
const wchar_t *  name 
)
pure virtual

Register plugin by name. Method to register plugin by name to allow other plugins to access it's functionality


Parameters
pluginThe PdfixPlugin object
namePlugin registration name
See also
Pdfix::GetPluginByName

◆ SetError()

virtual void Pdfix::SetError ( int  type,
const char *  error 
)
pure virtual

Sets the latest error message to the library.

Parameters
typeThe last error type.
errorThe last error.

◆ UnregisterEvent()

virtual bool Pdfix::UnregisterEvent ( PdfEventType  type,
PdfEventProc  proc,
void *  data 
)
pure virtual

Unregisters a user-supplied procedure to call when the specified event occurs. To un-register, you must use same type, proc and data that were used when the event was registered using Pdfix::RegisterEvent.


Parameters
typeThe registered event type.
procA registered user-supplied callback.
dataA pointer to registered user-supplied data.
Returns
true if event was registered, false otherwise.