Layer

APDFL Plugins

5 components85 items
52 Functions 6 Typedefs 7 Structures 20 Enums

ocrengine

33 items

Functions(27)

PDOCRCreateForm

OCREngineProcs.h:59

Recognizes Text in a PDEImage, at a specified resolution, creating a PDEForm with the Image and Text underneath it. Knowing the image's resolution can enhance recognition. NOTE: Determining the resolution of the image is the caller's responsibility. Creates a PDEForm element containing the image, and additional text underneath. The PDEForm element has a transformation matrix which makes it directly substitutable for the image in a Content stream. The PDEForm will be created in the specified document, sharing fonts with the results of recognizing text in other images. If a font that will represent all the characters in a word can't be found, the missingFontStrategy will determine the behavior to employ.

Parameters
engine: OCREngine

IN OCREngine object

doc: PDDoc

IN PDDoc object

image: PDEImage
resolution: ASInt32

IN image resolution for PDEImage object, in DPI

strategy: OCRMissingFontStrategy

IN specifies the behavior to take if a Font isn't available to represent the Text

Returns
PDEForm

a PDEForm composing the supplied image with the recognized text underneath

PDOCRParamsGetCandidateFonts

OCREngineProcs.h:210

Get the Candidate Fonts used to try to match recognized text, as an array of ASAtoms. Each ASAtom represents a name for a font to try to use for text recognition. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter. Each element is an ASAtom corresponding to a string representing a candidate font. This array can only be modified by calling PDOCRParamsSetCandidateFonts(). The length is given by PDOCRParamsGetNumCandidateFonts().

Parameters
params: OCRParams

IN OCRParams object

Returns
ASAtom *

an array of ASAtoms

PDOCRParamsGetNumCandidateFonts

OCREngineProcs.h:177

Get the Number of Candidate Fonts to try to match recognized text. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter.

Parameters
params: OCRParams

IN OCRParams object

Returns
ASInt32

the number of candidate font members in the OCRParams

PDOCRParamsSetCandidateFonts

void PDOCRParamsSetCandidateFonts(OCRParams params, ASAtom *fonts, ASInt32 numFonts)
OCREngineProcs.h:240

Set the Candidate Fonts used to try to match recognized text. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter. Each element is an ASAtom corresponding to a string representing a candidate font.

Parameters
params: OCRParams

IN OCRParams object

fonts: ASAtom *

IN an array of ASAtoms to set as candidate fonts

numFonts: ASInt32

the size of the fonts array

Returns
void

PDOCRParamsSetConfigParameter

ASBool PDOCRParamsSetConfigParameter(OCRParams params, const char *key, const char *value)
OCREngineProcs.h:263

Set an engine-specific configuration parameter. Multiple calls accumulate parameters. Calling with the same key replaces the previous value. These parameters are passed through to the underlying OCR engine (e.g., Tesseract) as engine-specific settings. See the OCR engine documentation for valid parameter names and values.

Parameters
params: OCRParams

IN OCRParams object to be modified.

key: const char *

IN Parameter name (will be copied). Must not be NULL.

value: const char *

IN Parameter value (will be copied). Must not be NULL.

Returns
ASBool

true on success, false on failure (e.g., NULL params/key/value or memory allocation failure).

Structures(2)

Enums(4)

OCRLanguage

OCREngineExpT.h:70

Enumeration to specify the language.

Values
OCRLanguage_English
—
OCRLanguage_Dutch
—
OCRLanguage_French
—
OCRLanguage_German
—
OCRLanguage_Italian
—
OCRLanguage_Portuguese
—
OCRLanguage_Spanish
—
OCRLanguage_Arabic
—
OCRLanguage_Armenian
—
OCRLanguage_ChineseTraditional
—
OCRLanguage_ChineseTraditionalVertical
—
OCRLanguage_ChineseSimplified
—
OCRLanguage_ChineseSimplifiedVertical
—
OCRLanguage_Japanese
—
OCRLanguage_JapaneseVertical
—
OCRLanguage_Korean
—
OCRLanguage_KoreanVertical
—
OCRLanguage_Afrikaans
—
OCRLanguage_Amharic
—
OCRLanguage_Assamese
—
OCRLanguage_Azerbaijani
—
OCRLanguage_AzerbaijaniCyrillic
—
OCRLanguage_Belarusian
—
OCRLanguage_Bengali
—
OCRLanguage_Tibetan
—
OCRLanguage_Bosnian
—
OCRLanguage_Breton
—
OCRLanguage_Bulgarian
—
OCRLanguage_Catalan
—
OCRLanguage_Corsican
—
OCRLanguage_Cebuano
—
OCRLanguage_Czech
—
OCRLanguage_Cherokee
—
OCRLanguage_Welsh
—
OCRLanguage_Danish
—
OCRLanguage_DanishFraktur
—
OCRLanguage_Dhivehi
—
OCRLanguage_Dzongkha
—
OCRLanguage_Greek
—
OCRLanguage_EnglishMiddle
—
OCRLanguage_Esperanto
—
OCRLanguage_MathEquationDetection
—
OCRLanguage_Estonian
—
OCRLanguage_Faroese
—
OCRLanguage_Basque
—
OCRLanguage_Persian
—
OCRLanguage_Finnish
—
OCRLanguage_Filipino
—
OCRLanguage_GermanFraktur
—
OCRLanguage_FrenchMiddle
—
OCRLanguage_Frisian
—
OCRLanguage_Irish
—
OCRLanguage_Galician
—
OCRLanguage_ScotsGaelic
—
OCRLanguage_GreekAncient
—
OCRLanguage_Gujarati
—
OCRLanguage_Haitian
—
OCRLanguage_Hebrew
—
OCRLanguage_Hindi
—
OCRLanguage_Croatian
—
OCRLanguage_Hungarian
—
OCRLanguage_Inuktitut
—
OCRLanguage_Indonesian
—
OCRLanguage_Icelandic
—
OCRLanguage_ItalianOld
—
OCRLanguage_Javanese
—
OCRLanguage_Kannada
—
OCRLanguage_Georgian
—
OCRLanguage_GeorgianOld
—
OCRLanguage_Kazakh
—
OCRLanguage_CentralKhmer
—
OCRLanguage_Kyrgyz
—
OCRLanguage_Kurmanji
—
OCRLanguage_KurdishArabicScript
—
OCRLanguage_Lao
—
OCRLanguage_Latin
—
OCRLanguage_Latvian
—
OCRLanguage_Lithuanian
—
OCRLanguage_Luxembourgish
—
OCRLanguage_Malayalam
—
OCRLanguage_Marathi
—
OCRLanguage_Macedonian
—
OCRLanguage_Maltese
—
OCRLanguage_Mongolian
—
OCRLanguage_Maori
—
OCRLanguage_Malay
—
OCRLanguage_Burmese
—
OCRLanguage_Nepali
—
OCRLanguage_Norwegian
—
OCRLanguage_Occitan
—
OCRLanguage_Oriya
—
OCRLanguage_OrientationAndScriptDetection
—
OCRLanguage_Panjabi
—
OCRLanguage_Polish
—
OCRLanguage_Pashto
—
OCRLanguage_Quechua
—
OCRLanguage_Romanian
—
OCRLanguage_Russian
—
OCRLanguage_Sanskrit
—
OCRLanguage_Sinhala
—
OCRLanguage_Slovak
—
OCRLanguage_SlovakFraktur
—
OCRLanguage_Slovenian
—
OCRLanguage_Sindhi
—
OCRLanguage_SpanishOld
—
OCRLanguage_Albanian
—
OCRLanguage_Serbian
—
OCRLanguage_SerbianLatin
—
OCRLanguage_Sundanese
—
OCRLanguage_Swahili
—
OCRLanguage_Swedish
—
OCRLanguage_Syriac
—
OCRLanguage_Tamil
—
OCRLanguage_Tatar
—
OCRLanguage_Telugu
—
OCRLanguage_Tajik
—
OCRLanguage_Tagalog
—
OCRLanguage_Thai
—
OCRLanguage_Tigrinya
—
OCRLanguage_Tonga
—
OCRLanguage_Turkish
—
OCRLanguage_Uyghur
—
OCRLanguage_Ukrainian
—
OCRLanguage_Urdu
—
OCRLanguage_Uzbek
—
OCRLanguage_UzbekCyrillic
—
OCRLanguage_Vietnamese
—
OCRLanguage_Yiddish
—
OCRLanguage_Yoruba
—
OCRLanguage_None
—

OCRMissingFontStrategy

OCREngineExpT.h:12

Enumeration to specify how to handle missing fonts during OCR.

Values
OCRMissingFontStrategy_Raise
—

Raise an exception.

OCRMissingFontStrategy_Ignore
—

Ignore the missing font and continue recognizing the next word of text.

OCRMissingFontStrategy_ReplacementText
—

Replace the characters of text with the Unicode replacement Character. NOTE: the CandidateFontsNames member of the OCRParams instance must include a Font that can represent this character or an exception will be raised.

OCRPageSegmentationMode

OCREngineExpT.h:40

Enumeration to specify how the OCR engine will view the page, and how it detects text segments.

Values
OCRPageSegmentationMode_OSDOnly
—

Orientation and script detection (OSD).

OCRPageSegmentationMode_AutomaticOSD
—

Automatic page segmentation with OSD.

OCRPageSegmentationMode_Automatic
—

Automatic without OSD.

OCRPageSegmentationMode_SingleColumn
—

Assume a single column of text.

OCRPageSegmentationMode_SingleBlockVertical
—

Assume a single block of vertically aligned text.

OCRPageSegmentationMode_SingleBlock
—

Assume a single block of text.

OCRPageSegmentationMode_SingleLine
—

Assume a single line of text.

OCRPageSegmentationMode_SingleWord
—

Assume a single word.

OCRPageSegmentationMode_CircleWord
—

Assume a single word in a circle.

OCRPageSegmentationMode_SingleChar
—

Assume a single char.

OCRPageSegmentationMode_SparseText
—

Find all text in no particular order.

OCRPageSegmentationMode_SparseTextOSD
—

Sparse text with OSD.

OCRPageSegmentationMode_RawLine
—

Treat as a raw line with no input processing.

OCRPerformance

OCREngineExpT.h:24

Enumeration to specify OCR performance.

Values
OCRPerformance_Default
—

Default performance.

The default performance is useful for most scenarios and is a reasonable tradeoff of speed vs. accuracy, thus suitable for most languages.

OCRPerformance_Accuracy
—

Blend accuracy with speed.

OCRPerformance_MoreAccuracy
—

Favor accuracy over speed.

OCRPerformance_BestAccuracy
—

Best possible accuracy.

pdflattener

13 items

Functions(6)

PDFlattenerConvert

ASBool PDFlattenerConvert(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags)
PDFlattenerProcs.h:37

Flatten a PDF file.

Parameters
aPDDoc: PDDoc

The input PDDoc which we want to Flatten. The output will be in the same PDDoc.

flattenParams: PDFlatten

Input parameters for flattening.

transQuality: float
firstPage: ASUns32

The first page of aPDDoc which we want to Flatten.

lastPage: ASUns32

The last page of aPDDoc which we want to Flatten.

numFlattenedPages: ASUns32 *

set to the number of pages that are flattened.

flags: ASUns32

Kept for future use. Default to 0.

Returns
ASBool

1 on success.

PDFlattenerConvertEx

ASBool PDFlattenerConvertEx(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags, FlattenProgressMonitor FlattenProgress, void *progressClientData)
PDFlattenerProcs.h:58

Flatten a PDF file.

Parameters
aPDDoc: PDDoc

The input PDDoc which we want to Flatten. The output will be in the same PDDoc.

flattenParams: PDFlatten

Input parameters for flattening.

transQuality: float
firstPage: ASUns32

The first page of aPDDoc which we want to Flatten.

lastPage: ASUns32

The last page of aPDDoc which we want to Flatten.

numFlattenedPages: ASUns32 *

set to the number of pages that are flattened.

flags: ASUns32

Kept for future use. Default to 0.

FlattenProgress: FlattenProgressMonitor

the callback which we want to register with the plug-in.

progressClientData: void *

any client data which client wants to get back with the callback for its own reference.

Returns
ASBool

1 on success.

PDFlattenerConvertEx2

ASBool PDFlattenerConvertEx2(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams)
PDFlattenerProcs.h:69

Flatten a PDF file.

Parameters
aPDDoc: PDDoc

The input PDDoc which we want to Flatten. The output will be in the same PDDoc.

firstPage: ASUns32

The first page of aPDDoc which we want to Flatten.

lastPage: ASUns32

The last page of aPDDoc which we want to Flatten.

numFlattenedPages: ASUns32 *

set to the number of pages that are flattened.

userParams: PDFlattenerUserParams

A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.

Returns
ASBool

1 on success.

PDFlattenerConvertEx3

ASBool PDFlattenerConvertEx3(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams, ASBool embedFlattenerProfiles)
PDFlattenerProcs.h:81

Flatten a PDF file.

Parameters
aPDDoc: PDDoc

The input PDDoc which we want to Flatten. The output will be in the same PDDoc.

firstPage: ASUns32

The first page of aPDDoc which we want to Flatten.

lastPage: ASUns32

The last page of aPDDoc which we want to Flatten.

numFlattenedPages: ASUns32 *

set to the number of pages that are flattened.

userParams: PDFlattenerUserParams

A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.

embedFlattenerProfiles: ASBool

embed Flattener color profiles.

Returns
ASBool

1 on success.

Typedefs(1)

Structures(1)

Enums(5)

PDFlattenerColorCompSet

PDFlattenerExpT.h:27

Enumeration for setting compression scheme for flattened color images.

Values
kPDFlattenerJpegCompression
—
kPDFlattenerZipCompression
—
kPDFlattenerJpeg2000Compression
—

PDFlattenerGrayscaleCompSet

PDFlattenerExpT.h:36

Enumeration for setting the compression scheme for the Flattened Grayscale images.

Values
kPDFlattenerGrayJpegCompression
—
kPDFlattenerGrayZipCompression
—
kPDFlattenerGrayJpeg2000Compression
—

PDFlattenerMonochromeCompSet

PDFlattenerExpT.h:45

Enumeration for setting the compression scheme for the Flattened Monochrome images.

Values
kPDFlattenerMonoCCITTGroup3Compression
—
kPDFlattenerMonoCCITTGroup4Compression
—
kPDFlattenerMonoZipCompression
—
kPDFlattenerMonoRunLengthCompression
—

PDFlattenerQualitySetting

PDFlattenerExpT.h:55

Enumeration for setting the Quality setting for the JPEG or JPEG2000 images.

Values
kPDFlattenerMinimum
—
kPDFlattenerLow
—
kPDFlattenerMedium
—
kPDFlattenerHigh
—
kPDFlattenerMaximum
—
kPDFlattenerJpeg2000Lossless
—

kPDFlattenerFlags

PDFlattenerExpT.h:184
Values
kPDFlattenerCompressColorImagesZIP
—

Setting this flag will choose the ZIP compression scheme (Flate encoding) for compressing the color images. Otherwise we will stick to the current default behavior and try to use JPEG compression wherever possible.

pdfprocessor

14 items

Functions(6)

PDFProcessorConvertAndSaveToPDFA

PDFProcessorProcs.h:36

Processes a PDF file, converts it to a PDF/A standard, and saves the output document to disk .

Parameters
srcPDDoc: PDDoc

Input PDDoc to be converted.

outputFilePath: ASPathName

Output file path complete with the name of the PDF file we want to save the output to.

outputFileSystem: ASFileSys
option: PDFProcessorPDFAConversionOption

Define the PDF/A conversion option.

userParams: PDFProcessorPDFAConvertParams

Parameters to control the conversion. @Return True if conversion is successful. Will throw an exception in case of errors.

Returns

PDFProcessorConvertAndSaveToPDFX

PDFProcessorProcs.h:66

Processes a PDF file, converts it to a PDF/X standard and saves it to disk.

Parameters
srcPDDoc: PDDoc

Input PDDoc to be converted.

outputFilePath: ASPathName

Output file path complete with the name of the PDF file we want to save the output to.

outputFileSystem: ASFileSys
option: PDFProcessorPDFXConversionOption

Define the PDF/X conversion option.

userParams: PDFProcessorPDFXConvertParams

Parameters to control the conversion. @Return True if conversion is successful. Will throw an exception in case of errors.

Returns

PDFProcessorConvertToPDFA

PDFProcessorProcs.h:48

Processes a PDF file and provides a pointer to the converted PDDoc.

Parameters
srcPDDoc: PDDoc

Input PDDoc to be converted.

outPDDoc: PDDoc *
option: PDFProcessorPDFAConversionOption

Define the PDF/A conversion option.

userParams: PDFProcessorPDFAConvertParams

Parameters to control the conversion.

outSaveParams: PDDocSaveParams
Returns

PDFProcessorConvertToPDFX

PDFProcessorProcs.h:78

Processes a PDF file, and provides a pointer to the converted PDDoc.

Parameters
srcPDDoc: PDDoc

Input PDDoc to be converted.

outPDDoc: PDDoc *
option: PDFProcessorPDFXConversionOption

Define the PDF/X conversion option.

userParams: PDFProcessorPDFXConvertParams

Parameters to control the conversion.

outSaveParams: PDDocSaveParams
Returns

Typedefs(1)

Structures(2)

Enums(5)

PDFProcessorColorCompressionSet

PDFProcessorExpT.h:100

Enumeration for setting compression scheme for Color Images.

Values
kPDFProcessorColorJpegCompression
—
kPDFProcessorColorZipCompression
—
kPDFProcessorColorJpeg2000Compression
—

PDFProcessorGrayscaleCompressionSet

PDFProcessorExpT.h:109

Enumeration for setting compression scheme for Grayscale Images.

Values
kPDFProcessorGrayJpegCompression
—
kPDFProcessorGrayZipCompression
—
kPDFProcessorGrayJpeg2000Compression
—

PDFProcessorMonochromeCompressionSet

PDFProcessorExpT.h:118

Enumeration for setting compression scheme for Monochrome Images.

Values
kPDFProcessorMonoCCITTGroup3Compression
—
kPDFProcessorMonoCCITTGroup4Compression
—
kPDFProcessorMonoZipCompression
—
kPDFProcessorMonoRunLengthCompression
—

PDFProcessorPDFAConversionOption

PDFProcessorExpT.h:30

This is used to select which particular PDF/A standard we want to convert to.

Values
kPDFProcessorConvertToPDFA1aRGB
—

Convert to PDF/A-1a RGB

kPDFProcessorConvertToPDFA1aCMYK
—

Convert to PDF/A-1a CMYK

kPDFProcessorConvertToPDFA1bRGB
—

Convert to PDF/A-1b RGB

kPDFProcessorConvertToPDFA1bCMYK
—

Convert to PDF/A-1b CMYK

kPDFProcessorConvertToPDFA2aRGB
—

Convert to PDF/A-2a RGB

kPDFProcessorConvertToPDFA2aCMYK
—

Convert to PDF/A-2a CMYK

kPDFProcessorConvertToPDFA2bRGB
—

Convert to PDF/A-2b RGB

kPDFProcessorConvertToPDFA2bCMYK
—

Convert to PDF/A-2b CMYK

kPDFProcessorConvertToPDFA2uRGB
—

Convert to PDF/A-2u RGB

kPDFProcessorConvertToPDFA2uCMYK
—

Convert to PDF/A-2u CMYK

kPDFProcessorConvertToPDFA3aRGB
—

Convert to PDF/A-3a RGB

kPDFProcessorConvertToPDFA3aCMYK
—

Convert to PDF/A-3a CMYK

kPDFProcessorConvertToPDFA3bRGB
—

Convert to PDF/A-3b RGB

kPDFProcessorConvertToPDFA3bCMYK
—

Convert to PDF/A-3b CMYK

kPDFProcessorConvertToPDFA3uRGB
—

Convert to PDF/A-3u RGB

kPDFProcessorConvertToPDFA3uCMYK
—

Convert to PDF/A-3u CMYK

kPDFProcessorConvertToPDFA4RGB
—

Convert to PDF/A-4 RGB

kPDFProcessorConvertToPDFA4CMYK
—

Convert to PDF/A-4 CMYK

kPDFProcessorConvertToPDFA4eRGB
—

Convert to PDF/A-4e RGB

kPDFProcessorConvertToPDFA4eCMYK
—

Convert to PDF/A-4e CMYK

kPDFProcessorConvertToPDFA4fRGB
—

Convert to PDF/A-4f RGB

kPDFProcessorConvertToPDFA4fCMYK
—

Convert to PDF/A-4f CMYK

PDFProcessorPDFXConversionOption

PDFProcessorExpT.h:81

This is used to select which particular PDF/X standard we want to convert to.

Values
kPDFProcessorConvertToPDFX1a2001
—

Convert to PDF/X-1a 2001

kPDFProcessorConvertToPDFX32003
—

Convert to PDF/X-3 2003

kPDFProcessorConvertToPDFX42010
—

Convert to PDF/X-4 2010

kPDFProcessorConvertToPDFX62020
—

Convert to PDF/X-6 2020

webtopdf

22 items

Functions(10)

WebToPDFConvertFileTree

WebToPDFResultCode WebToPDFConvertFileTree(const char *rootPath, const char *indexFile, const char *outputPath, WebToPDFParams params)
WebToPDFProcs.h:85

Convert a local directory to PDF.

Parameters
rootPath: const char *

Path to the root directory (UTF-8 encoded).

indexFile: const char *

Entry-point file name (e.g. "index.html"), or NULL for auto-detect.

outputPath: const char *

Path to the output PDF file (UTF-8 encoded).

params: WebToPDFParams

Conversion parameters, or NULL for defaults.

Returns
WebToPDFResultCode

Aindicating success or failure.

WebToPDFConvertHTML

WebToPDFResultCode WebToPDFConvertHTML(const char *htmlContent, const char *baseURL, const char *outputPath, WebToPDFParams params)
WebToPDFProcs.h:72

Convert an HTML string to PDF.

Parameters
htmlContent: const char *

The HTML content to convert (UTF-8 encoded).

baseURL: const char *

Base URL for resolving relative resources, or NULL.

outputPath: const char *

Path to the output PDF file (UTF-8 encoded).

params: WebToPDFParams

Conversion parameters, or NULL for defaults.

Returns
WebToPDFResultCode

Aindicating success or failure.

WebToPDFGetLastError

ASInt32 WebToPDFGetLastError(char *buffer, ASInt32 bufferSize)
WebToPDFProcs.h:96

Get a detailed error message from the last failed operation.

Parameters
buffer: char *

Buffer to receive the error message.

bufferSize: ASInt32

Size of buffer in bytes.

Returns
ASInt32

The actual length of the error message (may exceed bufferSize if truncated).

WebToPDFInitialize

WebToPDFProcs.h:24

Must be called once before any other WebToPDF functions. Sets up the Chromium Embedded Framework and internal plugin state.

Parameters
: void
Returns
ASBool

true on success, false on failure.

WebToPDFTerminate

WebToPDFProcs.h:32

Must be called when done using the plugin to release all resources, including the CEF runtime.

Parameters
: void
Returns
void

Typedefs(4)

WebToPDFLogCallback

typedef void(* WebToPDFLogCallback) (ASInt32 level, const char *message, void *clientData))(ASInt32 level, const char *message, void *clientData)
WebToPDFExpT.h:239

Called to deliver log messages generated during conversion. The callback is invoked on the conversion thread, so implementations should be thread-safe or dispatch to the appropriate thread.

Structures(2)

Enums(6)

WebToPDFDownsamplingDPI

WebToPDFExpT.h:197

Images whose native resolution exceeds the chosen threshold are downsampled to reduce file size.

Values
kWebToPDFDPIDisabled
—

Disable downsampling; preserve original resolution.

kWebToPDFDPI300
—

Downsample to 300 DPI (default).

kWebToPDFDPI75
—

Downsample to 75 DPI (screen quality).

kWebToPDFDPI150
—

Downsample to 150 DPI.

kWebToPDFDPI600
—

Downsample to 600 DPI (high quality print).

kWebToPDFDPI1200
—

Downsample to 1200 DPI (very high quality).

WebToPDFImageCompression

WebToPDFExpT.h:183

Image compression modes for raster images embedded in the output PDF.

Values
kWebToPDFCompressionJPEG
—

Lossy JPEG compression (smaller file size).

kWebToPDFCompressionLossless
—

Lossless compression (larger file, pixel-perfect).

WebToPDFPageOrientation

WebToPDFExpT.h:155

Page orientation for the output PDF.

Values
kWebToPDFOrientationPortrait
—

Portrait orientation (taller than wide).

kWebToPDFOrientationLandscape
—

Landscape orientation (wider than tall).

WebToPDFPageSize

WebToPDFExpT.h:168

Chooseand populateto specify exact dimensions in points.

Values
kWebToPDFPageSizeLetter
—

US Letter (8.5 x 11 in).

kWebToPDFPageSizeLegal
—

US Legal (8.5 x 14 in).

kWebToPDFPageSizeLedger
—

US Ledger / Tabloid (11 x 17 in).

kWebToPDFPageSizeA3
—

ISO A3 (297 x 420 mm).

kWebToPDFPageSizeA4
—

ISO A4 (210 x 297 mm).

kWebToPDFPageSizeA5
—

ISO A5 (148 x 210 mm).

kWebToPDFPageSizeCustom
—

Custom dimensions specified in.

WebToPDFResultCode

WebToPDFExpT.h:117

Every conversion function returns one of these codes to indicate success or the specific category of failure. Useto obtain a human-readable description when a non-success code is returned.

Values
kWebToPDFSuccess
—

Operation completed successfully.

kWebToPDFErrorBadPath
—

An input or output file path is invalid or inaccessible.

kWebToPDFErrorConverterFailure
—

The CEF rendering engine reported an internal error.

kWebToPDFErrorCEFInitFailed
—

CEF could not be initialized (missing binaries, sandbox failure, etc.).

kWebToPDFErrorInvalidURL
—

The supplied URL is malformed or uses an unsupported scheme.

kWebToPDFErrorTimeout
—

The conversion exceeded the configured timeout.

kWebToPDFErrorOutputFailed
—

The output PDF file could not be written.

kWebToPDFErrorNotInitialized
—

has not been called yet.

WebToPDFViewportSize

WebToPDFExpT.h:143

Controls the virtual browser viewport dimensions during rendering. Chooseand populateto specify exact pixel dimensions.

Values
kWebToPDFViewportDesktop
—

Desktop viewport (default 1280x1024).

kWebToPDFViewportMobile
—

Mobile viewport (e.g. 375x812).

kWebToPDFViewportTablet
—

Tablet viewport (e.g. 768x1024).

kWebToPDFViewportCustom
—

Custom dimensions specified in.

xps2pdf

3 items

Functions(3)

XPS2PDFConvert

ASInt32 XPS2PDFConvert(ASCab inSettings, ASInt32 conversionFlags, ASPathName inPath, ASFileSys inFileSys, PDDoc *outPDDoc, void *clientData)
XPS2PDFProcs.h:37

Converts aa XPS file into a PDF file.

Parameters
inSettings: ASCab
conversionFlags: ASInt32

Kept for future use. Default to 0.

inPath: ASPathName

Folder path where the input XPS files are kept.

inFileSys: ASFileSys

File system

outPDDoc: PDDoc *

The output PDDoc which we want to make from XPS.

clientData: void *

Kept for future use. Default to NULL.

Returns