ExtractPages with selected pages

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

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

Post Reply
Juuu
User
Posts: 1
Joined: Fri Mar 30, 2018 9:29 am

ExtractPages with selected pages

Post by Juuu »

Hello,

First, sorry for my English ;)

Here is my problem : I'm using the activeX PDFXChange and I need to extract selected pages (in thumbnails panel) from an open document in PDFXChange to a file on disk.

Here is my code:

Code: Select all

this.pdfWebViewer.SetProperty ("Operations.ExtractPages.RangeType", "Selected", 0);
this.pdfWebViewer.SetProperty ("Operations.ExtractPages.ExtractToFiles", 1);
this.pdfWebViewer.SetProperty ("Operations.ExtractPages.ToOneFile", 1);
this.pdfWebViewer.SetProperty ("Operations.ExtractPages.DestFolder", extractFolder);
this.pdfWebViewer.SetProperty ("Operations.ExtractPages.DestFileName", newFilename);
this.pdfWebViewer.SetProperty ("Operations.ExtractPages.DeleteAfterExtract", 1, 0);
this.pdfWebViewer.DoVerb ("Documents [#" + DocID + "]", "ExtractPages", 0, 0, 2);
This did not work, so I turned on the prompt as well to see what was going on:

Code: Select all

this.pdfWebViewer.DoVerb ("Documents [#" + DocID + "]", "ExtractPages", 0, 0, 0);
I realized that the "Selected Pages" option was disabled: the activeX did not seem to see that pages were selected yet there were several. All other settings were ok: DeleteAfterExtract enabled, Save As with filled paths, etc.

By validating the prompt and performing other tests with different settings, all of a sudden the selected pages were no longer disabled in the prompt: and I finally got the expected behavior with the lines of codes mentioned above. ...

The problem is that by using the same code on the workstation of a colleague, I got the problematic behavior encountered at the beginning (and then unlock it by displaying ke prompt and testing various settings), the problem is that we we will not do that for every post that will use our software ...

After testing, the setting.dat does not seem to have an impact.

What do you think blocks and makes sure that the selected pages are not detected initially ? For info, the multi tab of the viewer is disabled.

Another remark always using the code above: when the prompt is activated, we can see that it is the box "Extract pages in separate files" which is checked while it should be the box below "Save pages to a new file "? (ExtractToFiles and ToOneFile being 1).
In the end, it has no impact on the behavior and it seems to be just a visual bug.

Image

PDFXChange 2.5 Version
Post Reply