PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllFinalizes processes for a new PDF document and flushes data.
|
| HRESULT EndDoc () |
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
The EndDoc method finalizes all processes after BeginDoc and flushes data to a PDF file. When used with GenerateInMemoryFile, the method generates an in-memory byte buffer for the PDF document.
Analogue in new interface: IPDFDocument4::SaveToFile.
Example
Using of BeginDoc/EndDoc methods
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.FileName := 'test.pdf';
PDF.Resolution := 96;
PDF.AutoLaunch := false;
{ set other options }
PDF.BeginDoc; { document creation started }
{ something else here... }
PDF.EndDoc; { document creation ended, document is saved to disk }
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->FileName = "test.pdf"; PDF->Resolution = 96; PDF->AutoLaunch = false; // set other options PDF->BeginDoc(); // document creation started // something else here... PDF->EndDoc() // document creation ended, document is saved to disk
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.FileName = "test.pdf"; PDF.Resolution = 96; PDF.AutoLaunch = false; // set other options PDF.BeginDoc(); // document creation started // something else here... PDF.EndDoc() // document creation ended, document is saved to disk
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.FileName = "test.pdf" PDF.Resolution = 96 PDF.AutoLaunch = False ' set other options PDF.BeginDoc ' document creation started ' something else here... PDF.EndDoc ' document creation ended, document is saved to disk
See Also
Reference


