IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source  SOLVED

PDF-XChange Editor SDK for Developers

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

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source

Post by zarkogajic »

Hi Support,

I've added a few comments to a pdf, saved comments using "Export Comments To File" (from main menu). Saved both as FDF and XFDF.

I'm then trying to import those comments using the op.document.importCommentsAndFields.

I'm using IStream for Params.Root['Options']['SrcFile'].

Executing the IOperation's Do() for the FDF file raises "The parameter is incorrect."

Using the same code, but specifying the XFDF file for SrcFile works with no issues.

Is IStream not supported for FDF?

-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source

Post by Vasyl-Tracker Dev Team »

Stream is supported but operation mistakenly requires the write-permission for input stream. I guess it causes the problem with your readonly (very possible) stream...
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source  SOLVED

Post by zarkogajic »

Hi Vasyl,

In both cases my stream is opened as Read/Write.

Again: importing XFDF loads ok, importing ("the same") FDF raises the exception.

Anyhow, I will close the topic as I can use XFDF - even though I would be more happy with FDF (smaller size).

-žarko
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source

Post by Ivan - Tracker Software »

Can you send us sample FDF file that causes the problem?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source

Post by zarkogajic »

Hi Ivan,
fdf_xfdf.zip
(1.46 KiB) Downloaded 54 times
Attached both the fdf and xfdf exported from the same document.

Using the same code when doing op.document.importCommentsAndFields.

-žarko
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8440
Joined: Wed Jan 03, 2018 6:52 pm

Re: IStream FDF vs XFDF for op.document.importCommentsAndFields / "the parameter is incorrect" for FDF source

Post by TrackerSupp-Daniel »

Hello, zarkogajic

Thank you for the files, We are in the buildup to a new release, so the Dev team is a bit busier than usual. They are aware you've sent the requested files, and should hopefully get back to you soon.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply