Page 1 of 1

Release pdf-document

Posted: Wed Feb 24, 2010 11:58 am
by HELID
Hello!
I´m working in Delphi 2006. I use functions from the high-level API in PDFXchange PRO 3.5 for reading and inserting things in pdf-document´s.
The problem I get is that the documents I´ve read don´t get released. When I want to use one of the pdf-document´s later with
the TFilestream object in Delphi, the Tfilestream object returns an error saying that the file is locked by another process. How do i release
the pdf-document after reading (PXCp_ReadDocumentW) or inserting (PXCp_InsertPagesTo) or writing (PXCp_WriteDocumentW)???

Re: Release pdf-document

Posted: Wed Feb 24, 2010 2:21 pm
by Lzcat - Tracker Supp
Please read the documentation, this is documented :wink: Check PXCp_Delete function.
But also please take a look at the WriteFlags parameter in PXCp_WriteDocumentW function. I would recommend you set it to PXCp_Write_NoRelease and a later call to PXCp_Delete function to avoid more complex handling of PXCp_WriteDocumentW results.