
Adobe Acrobat SDK
Inserting Text into PDF Documents
Developing Plug-ins and Applications
Examining a PDF Library application source file 71
/* Save document to a file */
#if !MAC_ENV
PDDocSave(pdDoc, PDSaveFull | PDSaveLinearized ,ASPathFromPlatformPath
("out.pdf"), NULL, NULL, NULL);
#else
macPath = GetMacPath("out.pdf");
PDDocSave(pdDoc, PDSaveFull | PDSaveLinearized, macPath , NULL, NULL, NULL);
ASFileSysReleasePath(NULL,macPath);
#endif
//Release all objects
PDERelease((PDEObject) pdeFont);
PDERelease((PDEObject) pdeText);
i = PDPageReleasePDEContent(pdPage, NULL);
PDERelease((PDEObject)pdeColorSpace);
PDPageRelease(pdPage);
PDDocRelease(pdDoc);
HANDLER
ASGetErrorString(ERRORCODE, buf, sizeof(buf));
fprintf(stderr, "Error code: %ld, Error Message: %s\n", ERRORCODE, buf);
exit (-1);
END_HANDLER
}
#define INCLUDE_MYPDFLIBAPP_CPP1
#include "MyPDFLibApp.cpp"
#undef INCLUDE_MYPDFLIBAPP_CPP