Knowledge Base

Back to Articles List

I have a problem with PXCp_WriteDocumentW not working.

Problem:

I have a problem with PXCp_WriteDocumentW not working.

Every even number - 2,4,6……etc. - it doesn't work.
The odd numbered times -1,3,5,7....etc. it works.
Why?

Code:

XCPro35_Defs.PXCp_WriteDocumentW(pdf, AOutPdfFile, XCPro35_Defs.PXCp_CreationDisposition.PXCp_CreationDisposition_Overwrite, 0);

Resolution:

A call to PXCp_WriteDocumentW twice for the same document with the last parameter as zero (0) will produce unpredictable behavior (even a crash). See the documentation for details:

Topic 3.1.1.19 PXCp_WriteDocumentW, pg. 280, PDF-ToolsV4SDK.pdf

Was this article helpful?
Yes No Somewhat