DynaPDF Manual - Page 275

Previous Page 274   Index   Next Page 276

Function Reference
Page 275 of 821
pdfWriteFText(pdf, taCenter, "We use OpenOutputFile() now...");
pdfEndPage(pdf);
// No fatal error occurred?
if (pdfHaveOpenDoc(pdf))
{
// OK, now we can open the output file.
/* Note that the function can also be called in a while statement
* e.g. to display a file open dialog if the file could not be
* opened...
*/
if (!pdfOpenOutputFile(pdf, "c:/test.pdf"))
{
pdfDeletePDF(pdf);
printf("Cannot open output file!\n");
return -1;
}
if (pdfCloseFile(pdf))
{
printf("PDF file successfully created!\n");
}
}
pdfDeletePDF(pdf);
 

Previous topic: CreateNewPDF

Next topic: CreateOCG


Start Chat