Extract selected pages
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Extract selected pages
hello friends,
I want to Extract selected pages to the new pdf file and save it on disk. But the problem is how to Extract and save with one button ? it must be transparent for user. no action is needed.
I can't find all commands, I know there are over 400 commands. Can you send me the complete list of these commands ?
I contacted 'support@pdf-xchange.com' forthis, but I have not received a response.
Thank you for help.
I want to Extract selected pages to the new pdf file and save it on disk. But the problem is how to Extract and save with one button ? it must be transparent for user. no action is needed.
I can't find all commands, I know there are over 400 commands. Can you send me the complete list of these commands ?
I contacted 'support@pdf-xchange.com' forthis, but I have not received a response.
Thank you for help.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
List of all possible commands are found in "Commands" sample. In this sample you can also execute any command to see how it works (but notice that for some commands you need to have opened document).
Possible solutions to extract pages are:
1. Execute "ExtractPages" command. But this will show "Extract pages" dialog.
2. Use PDF Java Script. To learn more about it you can look at the "Acrobat JavaScript Object Specification"
Just a little sample form there:
This will create new PDF file for each page in the document.
3. Use PDF-XChange Tools SDK which allows to manipulate any PDF without using Viewer ActiveX.
In future we planning to add new functions to Viewer ActiveX to allow easily extract pages from document by using only Viewer ActiveX functions.
Possible solutions to extract pages are:
1. Execute "ExtractPages" command. But this will show "Extract pages" dialog.
Code: Select all
PDFView.DoVerb(0, "ExecuteCommand", "ExtractPages", 0)
Just a little sample form there:
Code: Select all
/* Extract Pages to Folder */
// regular expression acquire the base name of file
var re = /.*\/|\.pdf$/ig;
// filename is the base name of the file Acrobat is working on
var filename = this.path.replace(re,"");
try {
for (var i = 0; i < this.numPages; i++)
this.extractPages(
{
nStart: i,
cPath: "/C/"+filename+"_" + i +".pdf"
});
} catch (e) {
console.println("Aborted: "+e)
}
3. Use PDF-XChange Tools SDK which allows to manipulate any PDF without using Viewer ActiveX.
In future we planning to add new functions to Viewer ActiveX to allow easily extract pages from document by using only Viewer ActiveX functions.
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Hello,
Thanks for response.
The java Script code work well, but how can I get the list of selected pages ?
I searched for this function, but I can't find it in the SDK help file.
10x
Thanks for response.
The java Script code work well, but how can I get the list of selected pages ?
I searched for this function, but I can't find it in the SDK help file.
10x
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
What do you mean by saying "list of selected pages"?
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Hi,Corwin wrote:What do you mean by saying "list of selected pages"?
Whene I want to extract selected pages, I use PDF Java Script present at the "Acrobat JavaScript Object Specification". (see the sample). But if I want to extract the set of selected pages in the "Mosaics" mode (I use Ctrl + Right clic to select separate thumbnails), I can not because I don't know how to GetSelectedPages.
Look at the attached picture
http://www.monsterup.com/image.php?url= ... 649796.jpg
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
I'm afraid that this is not possible in current version of Viewer ActiveX. 

-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
No I don't think so. How can extract the selected pages if we don't know which are selected.Corwin wrote:I'm afraid that this is not possible in current version of Viewer ActiveX.
I think if this is not possible in viewer activex, it's possible by running java script.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
In this case JS doesn't receive any information from the Viewer UI.
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Hello,
Please help us to do that, I'm going to buy the activex version of PDF Xchange. But this a very important function to have in our product.
thanks for helping me.
Please help us to do that, I'm going to buy the activex version of PDF Xchange. But this a very important function to have in our product.
thanks for helping me.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Hello Rad1.
Good news - in new build of Viewer ActiveX you will be able to extract pages without showing "Extract pages" dialog.
Good news - in new build of Viewer ActiveX you will be able to extract pages without showing "Extract pages" dialog.
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
I must wait for next build to buy the activex !!!Corwin wrote:Hello Rad1.
Good news - in new build of Viewer ActiveX you will be able to extract pages without showing "Extract pages" dialog.
Can you tell me whene this will be available ?
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
I think, you may expect to see it within the next two weeks.
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Extract selected pages
We are now hoping this will be towards the end of this week/weekend.
HTH
HTH
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
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 1
- Joined: Wed Jun 03, 2009 1:47 pm
Re: Extract selected pages
Hi There,
I also need this feature
Is this available yet?
I also need this feature

-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Nope. We have little delay with release of new build.
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Extract selected pages
It will be released for sure this weekend.
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
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Is the new release available ?
I need this function to complete my software developement.
I have tried to do this :
But the seconde insctruction doesn't work. I think it is not implemented yet (Prompts.ConfirmExtractPages).
thanks for help.
I need this function to complete my software developement.
I have tried to do this :
Code: Select all
PDFView.DoVerb(0, "ExecuteCommand", "ExtractPages", 0)
PDFView.SetProperty("Prompts.ConfirmExtractPages.UserChoice", 0, 0);
thanks for help.
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Extract selected pages
Code: Select all
PDFView.DoVerb(0, "ExecuteCommand", "ExtractPages", 0)
In the new build (coming soon) activeX can be process 'PXCVA_NoUI' flag.
For skip confirmation about replacing files you should process of special situation:
Code: Select all
OnEvent(Type, Name, ..)
{
if ((Type == PXCVA_OnDisplayPrompt) && (Name == "Prompts.ConfirmFileReplace"))
{
PDFView.SetProperty("Prompts.ConfirmFileReplace.UserChoice", "YesToAll", 0);
}
}
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
thanks for responseVasyl-Tracker Dev Team wrote: For skip confirmation about replacing files you should process of special situation:Code: Select all
OnEvent(Type, Name, ..) { if ((Type == PXCVA_OnDisplayPrompt) && (Name == "Prompts.ConfirmFileReplace")) { PDFView.SetProperty("Prompts.ConfirmFileReplace.UserChoice", "YesToAll", 0); } }

when can we expect the new version ?
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
I thought of another solution. Is if we can customize the ExtractPages dialog box. I want to hide or disable the check box : Extract to separate file. and the "Save as" panel. Can I customize the interface of this dialog box ?
regards
regards
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Hi.
As I was informed new build is available for download.
In new build you may extract selected pages by using next code:
As I was informed new build is available for download.
In new build you may extract selected pages by using next code:
Code: Select all
var dti = 0;
var dto = 0;
PDFView.SetProperty('Operations.ExtractPages.RangeType','Selected',0);
PDFView.DoVerb('Documents[0]','ExtractPages', dti, dto, 2);
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Hi John,
Thank you very much for this good work.
is it possible to delete pages after extraction from the original file ?
Regards

is it possible to delete pages after extraction from the original file ?
Regards

-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Yes, it is - sure. You can set next property:is it possible to delete pages after extraction from the original file ?
Code: Select all
PDFView.SetProperty("Operations.ExtractPages.DeleteAfterExtract",1,0);
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Hi,
Thanks for reply.
I want to do the same thing to insert page without IU. Can I do this :
DFView.SetProperty('Operations.InsertPages.Source','FromFile',0);
PDFView.DoVerb('Documents[0]','InsertPages', 0, 0, 2);
Thank you.
Thanks for reply.
I want to do the same thing to insert page without IU. Can I do this :
DFView.SetProperty('Operations.InsertPages.Source','FromFile',0);
PDFView.DoVerb('Documents[0]','InsertPages', 0, 0, 2);
Thank you.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Hello.
No, in current build you can insert only empty pages.
We will try to add inserting pages from file as soon as possible.
No, in current build you can insert only empty pages.
We will try to add inserting pages from file as soon as possible.
-
- User
- Posts: 223
- Joined: Wed Aug 22, 2007 4:40 pm
Re: Extract selected pages
There is already the ability to insert pages from a file using Javascript ("this.insertPages").
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
ugradedeveloper is right
. For now you can insert existed pages from another PDF document by using JS.

-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
Yes man ! It wooooooorks. I have wath I needed.
Thanks. I think I can do the same thing with ReplacePages ?
Thanks. I think I can do the same thing with ReplacePages ?
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Nope. For now Viewer dosn't have functionality for ReplacePages..
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: Extract selected pages
ok, I hope that will be available for the next releases. ( it is not realy necessary for our product, but it can be a funny function to add in).
-
- User
- Posts: 35
- Joined: Thu Nov 26, 2009 3:14 am
Re: Extract selected pages
Is it available to insertpage by using VB via code?
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Extract selected pages
Yes, please see "Objects::Documents::<Item>::InsertPages" section in PDF-XChange Viewer ActiveX SDK Help file.
-
- User
- Posts: 35
- Joined: Thu Nov 26, 2009 3:14 am
Re: Extract selected pages
It's only insert before page and specify how many page from the file we want.
How about insert to last page
How about based on thumbnail, which i select i want it insertafter.
Can it be done?
How about insert to last page
How about based on thumbnail, which i select i want it insertafter.
Can it be done?
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Extract selected pages
Hi johnnyjoe.
For insert pages after last page you should specify:
That is, if target document contains 5 pages then:
Best
Regards.
For insert pages after last page you should specify:
Code: Select all
SetProperty("Operations.InsertPages.InsertBefore", <PagesCount>, 0);
Code: Select all
SetProperty("Operations.InsertPages.InsertBefore", 5, 0);
Regards.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 35
- Joined: Thu Nov 26, 2009 3:14 am
Re: Extract selected pages
How i able to detect which page is selected in Thumbnail via code?
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Extract selected pages
Hi, johnnyjoe.
No way for this in current realization.
Will be in the new version..
Best
Regards.
No way for this in current realization.

Will be in the new version..
Best
Regards.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 35
- Joined: Thu Nov 26, 2009 3:14 am
Re: Extract selected pages
When will the new realease will be available?
How about can i able to know the page number of the current viewed document in the viewer?
I know how to get the total page of the document.
What i want to do was:
I able to go via code go to First Page, Next page, Previous page, Last Page.
How about can i able to know the page number of the current viewed document in the viewer?
I know how to get the total page of the document.
What i want to do was:
I able to go via code go to First Page, Next page, Previous page, Last Page.
-
- Site Admin
- Posts: 798
- Joined: Tue Apr 14, 2009 11:33 pm
Re: Extract selected pages
Hi Johnnyjoe,
Please refer to page 111 of the Viewer ActiveX SDK
topic 2.2.2.10.1.2 Pages
Regards
Chris
Please refer to page 111 of the Viewer ActiveX SDK
topic 2.2.2.10.1.2 Pages
Regards
Chris
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.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com