DynaPDF Manual - Page 579
Previous Page 578 Index Next Page 580
Function Reference
Page 579 of 839
OpenOutputFile
Syntax:
LBOOL pdfOpenOutputFile(
const PPDF* IPDF,
// Instance pointer
const char* OutPDF) // Output file name
The function opens the output file into which the PDF file should be written. The PDF file must be
created in memory if this function should be used. This is the case if the output file name is set to
NULL or to an empty string in CreateNewPDF().
After the output file was opened the PDF file is no longer created in memory. So, there is no need to
call FreePDF() after the file was finished with CloseFile() or CloseFileEx().
OpenOutputFile() can be called in a while statement, e.g. to display a open file dialog if the file
could not be opened. Once the function succeeds the PDF file can be finished with CloseFile().
It is strongly recommended to check with HaveOpenDoc() whether a PDF file is still in memory
before calling this function.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. Unicode paths are
converted to UTF-8 on non-Windows operating systems.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: Damaged PDF files
Next topic: OpenOutputFileEncrypted