PXCp_WriteDocumentW Bug in Latest Build

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

PXCp_WriteDocumentW Bug in Latest Build

Post by jeffp »

Your new build posted on February 17 seems to have introduced a bug in the PXCp_WriteDocumentW call when saving over a file that alread exists. This is a pretty serious bug for me.

My typical scenario is to Open the file, append a new page, and the try to save over the orginal file.

The error code returns -211339492 in Delphi.

I rolled back to the Feb 2 build of the DLLs and it works fine again.


Code: Select all

function TPDFLibEx.SaveDocument(AFileName: String; APassword: String = ''): Boolean;
var
  hr: HRESULT;
begin
  Result := False;
  if (FDocID > 0) and ForceDirectories(ExtractFilePath(AFileName)) then
  begin
    if (APassword <> '') then
    try
      PXCp_EnableSecurity(FDocID, True, PChar(APassword), PChar(APassword));
    except end;

    hr := PXCp_WriteDocumentW(FDocID,
      PWChar(WideString(AFileName)),
      PXCp_CreationDisposition_Overwrite,
      PXCp_Write_NoRelease);

    Result := not IS_DS_FAILED(hr);
  end;
end;
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: PXCp_WriteDocumentW Bug in Latest Build

Post by John - Tracker Supp »

Thanks Jeff, we are already investigating a similar report and if duplicated will revise in the next build due in the next week or so...
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_WriteDocumentW Bug in Latest Build

Post by jeffp »

Thanks. Let me know if you want me to put a Delphi example.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PXCp_WriteDocumentW Bug in Latest Build

Post by Lzcat - Tracker Supp »

Problem is reproduced and fixed. Fix will be avail with next build (4.0.0178).
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply