Document Changed Prompt
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Document Changed Prompt
I am opening and closing PDF documents in the ActiveX viewer via code. However, I was expecting to receive a default prompt when closing a changed document just like I do if I run the Viewer stand alone.
For example, here's what I'm doing.
1. OpenDocument via code
2. User then clicks the Rotate button on the toolbar
3. CloseDocument via code
Why am I not getting a Changed Document prompt when I close a changed document via code?
Is there a setting I'm missing.
Thanks.
For example, here's what I'm doing.
1. OpenDocument via code
2. User then clicks the Rotate button on the toolbar
3. CloseDocument via code
Why am I not getting a Changed Document prompt when I close a changed document via code?
Is there a setting I'm missing.
Thanks.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
Hi, jeffp
If yes - you cannot change document by these commands, it changes viewing mode of the document.
For rotate all pages really, you should use:
See 'Reference/Named Items/Simple Operations/RotateDocumentPages'.
If I understand you right: the 'Rotate button' - means 'Rotate View CW/CCW' commands?1. OpenDocument via code
2. User then clicks the Rotate button on the toolbar
3. CloseDocument via code
Why am I not getting a Changed Document prompt when I close a changed document via code?
If yes - you cannot change document by these commands, it changes viewing mode of the document.
For rotate all pages really, you should use:
Code: Select all
SetProperty("Operations.RotatePages.RangeType", "All", 0);
SetProperty("Operations.RotatePages.RangeFilter", "All", 0);
SetProperty("Operations.RotatePages.Direction", "Clockwise", 0);
docId = GetActiveDocument();
DoVerb(NULL, "RotateDocumentPages", dataIn(docId), NULL, PXCVA_NoUI);
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.
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.
Re: Document Changed Prompt
Ok. I see. Your rotate buttons on the ActiveX toolbar do NOT trigger a change in the document but only change the viewing mode.
This brings up a critical issue for me. Many of my users are viewing their scanned PDF documents in the ActiveX viewer so that they can correct incorrectly rotated page. As such, the user will scroll through the pages of a PDF document and rotate some of the pages back to normal by clicking your rotate buttons.
If the rotate button only changes the viewing mode, how can a user fix a mis-rotated page? That is, I need the ability to save a document with the page rotated as it appears on screen?
The sample code you gave me will allow me to do this rotation and save it in code? But I'd prefer not to add a custom button on the ActiveX viewer for this. Does not the ActiveX viewer functionality provide a way to rotate and save a page?
This brings up a critical issue for me. Many of my users are viewing their scanned PDF documents in the ActiveX viewer so that they can correct incorrectly rotated page. As such, the user will scroll through the pages of a PDF document and rotate some of the pages back to normal by clicking your rotate buttons.
If the rotate button only changes the viewing mode, how can a user fix a mis-rotated page? That is, I need the ability to save a document with the page rotated as it appears on screen?
The sample code you gave me will allow me to do this rotation and save it in code? But I'd prefer not to add a custom button on the ActiveX viewer for this. Does not the ActiveX viewer functionality provide a way to rotate and save a page?
Re: Document Changed Prompt
Ok. I've looked further into this. I appears that the ActiveX viewer has a menu item to rotate the actual page, whereas the rotate buttons just rotate the view.
Our users are going to expect that the rotate buttons will actually rotate to page. As such, is there a way to intercept the rotate button clicks so that I can fire the rotate page code instead?
Alternatively, is there a way to add a custom button to the toolbar where I can hook up the rotate page code?
Our users are going to expect that the rotate buttons will actually rotate to page. As such, is there a way to intercept the rotate button clicks so that I can fire the rotate page code instead?
Alternatively, is there a way to add a custom button to the toolbar where I can hook up the rotate page code?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
Hi, jeffp.
In the new build(2.43.x, upcoming) you will be able to use some commands:
'RotateSelectedPages90'
'RotateSelectedPages180'
'RotateSelectedPages270'
These commands can be added to main toolbars by 'Customize' dialog(right-click on any toolbar, 'Commands/Document').
After this, the customized UI(and all other settings) can be stored/restored by SaveSettings/LoadSettings functions.
Note: you will be able to rotate selected pages, but you should display 'Thumbnails' view and select necessary pages before usage of these commands,
instead, if no selected pages(or 'Thumbnails' is invisible), then current page will be rotated.
You may close document without prompting for save by:
CloseDocument(docId, PXCVA_NoUI);
Best
Regards.
In the new build(2.43.x, upcoming) you will be able to use some commands:
'RotateSelectedPages90'
'RotateSelectedPages180'
'RotateSelectedPages270'
These commands can be added to main toolbars by 'Customize' dialog(right-click on any toolbar, 'Commands/Document').
After this, the customized UI(and all other settings) can be stored/restored by SaveSettings/LoadSettings functions.
Note: you will be able to rotate selected pages, but you should display 'Thumbnails' view and select necessary pages before usage of these commands,
instead, if no selected pages(or 'Thumbnails' is invisible), then current page will be rotated.
You may close document without prompting for save by:
CloseDocument(docId, PXCVA_NoUI);
Best
Regards.
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.
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.
Re: Document Changed Prompt
'RotateSelectedPages90'
'RotateSelectedPages180'
'RotateSelectedPages270'
I saw these commands in the build I have, and I tried putting them on a custom toolbar, but here are the issues I found.
1. Since I didn't have thumbnails showing, these button were always disabled/dimmed out so I couldn't use them. In the upcoming release, do I understand that they will work on the current page if no thumbnails view is on?
2. These items didn't have an associated image, so putting them on a custom toolbar made for some very big buttons since it used their captions instead of images. Will the upcoming release have images for these buttons?
Also, I did figure out how to receive the changed event triggered by a click of the rotate CCW or rotate CW buttons. I thought I might be able to perform an actual Page Rotation after receiving this event. In turns out that I can, but the problem is that the page rotation turns it one more time in the veiwer. As such, I then thought I could rotate the view back to normal before I did the actual page rotation. But I discovered that I couldn't execute the command 'RotateCW' or 'RotateCCW' inside of the event. WHen I did, it froze.
Is command execution prohibited inside of the OnEvent procedure?
Also, is there a way to "skip" the execution of the rotateCW and rotateCWW commands so that I can replace the action with a actual rotate page action?
'RotateSelectedPages180'
'RotateSelectedPages270'
I saw these commands in the build I have, and I tried putting them on a custom toolbar, but here are the issues I found.
1. Since I didn't have thumbnails showing, these button were always disabled/dimmed out so I couldn't use them. In the upcoming release, do I understand that they will work on the current page if no thumbnails view is on?
2. These items didn't have an associated image, so putting them on a custom toolbar made for some very big buttons since it used their captions instead of images. Will the upcoming release have images for these buttons?
Also, I did figure out how to receive the changed event triggered by a click of the rotate CCW or rotate CW buttons. I thought I might be able to perform an actual Page Rotation after receiving this event. In turns out that I can, but the problem is that the page rotation turns it one more time in the veiwer. As such, I then thought I could rotate the view back to normal before I did the actual page rotation. But I discovered that I couldn't execute the command 'RotateCW' or 'RotateCCW' inside of the event. WHen I did, it froze.
Is command execution prohibited inside of the OnEvent procedure?
Also, is there a way to "skip" the execution of the rotateCW and rotateCWW commands so that I can replace the action with a actual rotate page action?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
Hi, jeffp.
This feature can be added in the future(may be in the V3).
Cheers.
It will be fixed in the new build.1. Since I didn't have thumbnails showing, these button were always disabled/dimmed out so I couldn't use them. In the upcoming release, do I understand that they will work on the current page if no thumbnails view is on?
Images will be added in the new build.2. These items didn't have an associated image, so putting them on a custom toolbar made for some very big buttons since it used their captions instead of images. Will the upcoming release have images for these buttons?
No way for override of command execution in the current realization.Also, is there a way to "skip" the execution of the rotateCW and rotateCWW commands so that I can replace the action with a actual rotate page action?
This feature can be added in the future(may be in the V3).
Cheers.
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.
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.
Re: Document Changed Prompt
Great. I look forward to the new build.
Also,
1. Will there be an image for the "RotatePages" item as well. The one that brings up the dialog.
2. Have you ever considered adding a new built in Toolbar called "Rotate Pages" to go along with your "Rotate View"?
Also,
1. Will there be an image for the "RotatePages" item as well. The one that brings up the dialog.
2. Have you ever considered adding a new built in Toolbar called "Rotate Pages" to go along with your "Rotate View"?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
Hi, jeffp.
Sure.1. Will there be an image for the "RotatePages" item as well. The one that brings up the dialog.
You may add rotation-commands into any standard toolbar or create custom toolbar(called as "Rotate Pages") with these commands by 'Customize' feature.2. Have you ever considered adding a new built in Toolbar called "Rotate Pages" to go along with your "Rotate View"?
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.
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.
Re: Document Changed Prompt
How to use via Code for RotateSelectedPages90?
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
Hi, jeffp.
Please look to 'Reference/Named Items/Simple Operations/ExecuteCommand':How to use via Code for RotateSelectedPages90?
Code: Select all
DoVerb(NULL, "ExecuteCommand", dataIn("RotateSelectedPages90"), NULL, 0);
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.
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.
Re: Document Changed Prompt
I had try those code before in my application.
Im using VB
i had Type mismatch
Im using VB
i had Type mismatch
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Document Changed Prompt
In VB6 try to use following code:
Code: Select all
Call CoPDFXCview1.DoVerb("", "ExecuteCommand", "RotateSelectedPages90", 0, 0)
Re: Document Changed Prompt
Thank! It's work.
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Document Changed Prompt
Good
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
Re: Document Changed Prompt
Vasyl--
Thanks for adding the images to the command below so that I can use them on a custom toolbar.
RotatePages
RotateSelectedPages90
RotateSelectedPages180
RotateSelectedPages270
This has brought up two further suggestions that I hope you can implement in a future release.
1. I believe most users (at least my users) think in terms of rotating clockwise and counter clockwise. As such, can the Caption/Hint/Image of RotateSelecedPages270 be changed to the concept of rotating COUNTER clockwise 90 degrees. If you look at your RotatePages dialog, your drop down menu follows this thinking.
2. In addition to adding images to the rotate commands, you also made them work even when the Pages Thumbnails view was not on. Could I request you do the same thing with the "Delete" command. That is, can you make it operate on the selected page even with no thumbnails view on?
Thanks again for a killer product.
Thanks for adding the images to the command below so that I can use them on a custom toolbar.
RotatePages
RotateSelectedPages90
RotateSelectedPages180
RotateSelectedPages270
This has brought up two further suggestions that I hope you can implement in a future release.
1. I believe most users (at least my users) think in terms of rotating clockwise and counter clockwise. As such, can the Caption/Hint/Image of RotateSelecedPages270 be changed to the concept of rotating COUNTER clockwise 90 degrees. If you look at your RotatePages dialog, your drop down menu follows this thinking.
2. In addition to adding images to the rotate commands, you also made them work even when the Pages Thumbnails view was not on. Could I request you do the same thing with the "Delete" command. That is, can you make it operate on the selected page even with no thumbnails view on?
Thanks again for a killer product.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Document Changed Prompt
You are right, we will think about it in the new version...I believe most users (at least my users) think in terms of rotating clockwise and counter clockwise. As such, can the Caption/Hint/Image of RotateSelecedPages270 be changed to the concept of rotating COUNTER clockwise 90 degrees.
We will add a new command "DeleteSelectedPages" for this situation and it will function even when the Pages Thumbnails are invisible. Possibly - in the next build.In addition to adding images to the rotate commands, you also made them work even when the Pages Thumbnails view was not on. Could I request you do the same thing with the "Delete" command. That is, can you make it operate on the selected page even with no thumbnails view on?
Cheers
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.
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.