PlanetPress Capture Library
TPgcUtility Class Reference

This object wraps functionality to read and process PGC files directly. More...

List of all members.

Public Member Functions

IFileList SplitPGC (const WideString OutputFolder)
 Takes a PGC file and splits it by pattern.
 MergePGC (const IFileList FileList, const WideString OutputFilename)
 Takes multiple PGC files and merges them into one PGC.
WideString GetPatternAddress (Integer Index)
 Returns the pattern address at the specified index.
Integer GetPatternCount ()
 Returns the number of different patterns found inside the PGC file.
WideString GetPenProperty (TPenProperty PropertyID)
 Returns the value of the requested property.
 LoadFromFile (const WideString FileName)
 Loads a PGC file.
 SaveAsPDF (const WideString OutputFilename, const IPenStore PenStore)
 Saves the inks from the loaded PGC as a PDF.

Detailed Description

This object wraps functionality to read and process PGC files directly.

Instances of this object can be created using the CaptureLib.PgcUtility ProgID.

Note:
The terms pattern and page can be used interchangeably. A page may only use one pattern and a pattern can only be used on one page.
Note:
Except for MergePGC, every method works on the file loaded by LoadFromFile.

Member Function Documentation

WideString TPgcUtility::GetPatternAddress ( Integer  Index)

Returns the pattern address at the specified index.

Parameters:
IndexIndex of the desired address.
Returns:
The pattern address.
Integer TPgcUtility::GetPatternCount ( )

Returns the number of different patterns found inside the PGC file.

Returns:
Number of different patterns.
WideString TPgcUtility::GetPenProperty ( TPenProperty  PropertyID)

Returns the value of the requested property.

Parameters:
PropertyIDIdentification number of the requested property. This can be one of:
  • ppVCard (0)
  • ppEmail (1)
  • ppCellPhone (2)
  • ppSerial (4)
Returns:
Value of the specified properties
TPgcUtility::LoadFromFile ( const WideString  FileName)

Loads a PGC file.

Parameters:
FileNameFile name of the PGC to load.
TPgcUtility::MergePGC ( const IFileList  FileList,
const WideString  OutputFilename 
)

Takes multiple PGC files and merges them into one PGC.

All the input PGC files must belong to the same pen, otherwise an exception will be raised.

Parameters:
FileListList of complete path and file names of the PGC files to merge.
OutputFilenameComplete path and file name of the merged file.
Exceptions:
EOleExceptionPGC files do not all belong to the same pen.
TPgcUtility::SaveAsPDF ( const WideString  OutputFilename,
const IPenStore  PenStore 
)

Saves the inks from the loaded PGC as a PDF.

It creates one page per pattern found inside the PGC. All the information relative to the PGC is stored in the XMP of the PDF.

Parameters:
OutputFilenameFilename for the created PDF.
PenStoreInstance of the Pen Store object. The pen referenced by the loaded PGC file must be licensed for use in the Pen Store.
Exceptions:
EOleExceptionThe pen is not licensed.
IFileList TPgcUtility::SplitPGC ( const WideString  OutputFolder)

Takes a PGC file and splits it by pattern.

A new PGC file is created for every pattern found in the loaded PGC.

Parameters:
OutputFolderFolder in which to store the split PGC files.
Returns:
A list containing only the names (not the path) of the PGC files that were created.