PDF Programming
PDF Programming
Not every implementation of the “SDK”has 100% of the same features (even between Acrobat
and PDFLibrary).
Content extraction
PDF rendering
PDEObject
PDF Objects
Acrobat treats the objects as opaque, while SPDF lets you view their contents in the debugger
(incl. objectID!)
Although Acrobat allows you to use them interchangeably, SPDF does not and in fact will
generate compile time errors
Rather than working with literal strings all the time, many SDK calls take ASAtoms.
ASAtomFromString()
ASAtomGetString()
ASAtomExistsForString()
ASFileSys
A base “class” the represents a way for the SDK to read & write the data of a PDF file. (a fancy
Stream)
ASPathName
ASPathFromPlatformPath(void* platformPath)
Error Handling
blocks
ERRORCODE
Unfortunately, Acrobat does NOT always “throw”. Sometimes you have to use other methods
If want a null CosObject, you can call CosNewNull() to get one. BUT that should be treated as a
valid object and NOT as NULL.
DURING
HANDLER
theError = ERRORCODE ;
if ( theASPathName != NULL ) {
return ;
END_HANDLER