Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI SOLVED
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.
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.
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi Support,
I'm using the PDFOptimizer.pvp plugin and as a result the "Save As Optimized..." appears under File menu.
When executing that command, the document will actually be saved to the file system, but in the UI it appears as not saved:
1. Create a new (empty) document
2. Document created:
3. Do "Save As Optimized..." -> "Optimize PDF" dialog appears, click "Ok" -> "Save File" dialog appears -> Specify the name and click "Save": the file IS saved to file system.
However, trying to close the document brings:
And also: events that happen BEFORE "Optimize PDF" dialog are e.document.beforeSave, e.document.performSave, e.document.savePerformed and e.document.afterSave - in all events IPXV_DocSaveEvent.Dest is assigned but is NOT IAFS_Name! What is it?
Then the "Save File" dialog appears, with an option to specify the name for the file, and upon clicking "Save" - no events are raised.
p.s.
I've edited the FullDemo to include loading of the PDFOptimizer.pvp ...
p.s.2
The same issue in EU Editor version 335.
-žarko
I'm using the PDFOptimizer.pvp plugin and as a result the "Save As Optimized..." appears under File menu.
When executing that command, the document will actually be saved to the file system, but in the UI it appears as not saved:
1. Create a new (empty) document
2. Document created:
3. Do "Save As Optimized..." -> "Optimize PDF" dialog appears, click "Ok" -> "Save File" dialog appears -> Specify the name and click "Save": the file IS saved to file system.
However, trying to close the document brings:
And also: events that happen BEFORE "Optimize PDF" dialog are e.document.beforeSave, e.document.performSave, e.document.savePerformed and e.document.afterSave - in all events IPXV_DocSaveEvent.Dest is assigned but is NOT IAFS_Name! What is it?
Then the "Save File" dialog appears, with an option to specify the name for the file, and upon clicking "Save" - no events are raised.
p.s.
I've edited the FullDemo to include loading of the PDFOptimizer.pvp ...
p.s.2
The same issue in EU Editor version 335.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi zarkogajic,
If the same issue happens in the End-User Editor then please write to the appropriate forum (the End-User one) - you will be assisted there.
Cheers,
Alex
If the same issue happens in the End-User Editor then please write to the appropriate forum (the End-User one) - you will be assisted there.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi Alex,
Thanks. Will do so.
Note that this affects me as the user of the SDK - and that's my main concern.
So:
-žarko
Thanks. Will do so.
Note that this affects me as the user of the SDK - and that's my main concern.
So:
events that happen BEFORE "Optimize PDF" dialog are e.document.beforeSave, e.document.performSave, e.document.savePerformed and e.document.afterSave - in all events IPXV_DocSaveEvent.Dest is assigned but is NOT IAFS_Name! What is it?
-žarko
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi support,
Ok, so EU Forum reveals what's happening:
-žarko
Ok, so EU Forum reveals what's happening:
Since none of the 4 events happen after the Save As dialog - how do I get the name of the file to be saved?...Save As Optimized actually saves an optimized copy of the document, so it does not change the original.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi žarko,
If you are saving the new, previously unsaved document then the Dest would be IString object with the path.
If you are optimizing some document that was previously saved, then these events won't be fired, as the IPXV_Document::Save method won't be called at all.
To be 100% sure, you can cast IAFS_Name, IAFS_File, IString and IStream - I think these are all of the possible interfaces for such kinds of destinations.
Cheers,
Alex
If you are saving the new, previously unsaved document then the Dest would be IString object with the path.
If you are optimizing some document that was previously saved, then these events won't be fired, as the IPXV_Document::Save method won't be called at all.
To be 100% sure, you can cast IAFS_Name, IAFS_File, IString and IStream - I think these are all of the possible interfaces for such kinds of destinations.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi zarko,
As for the file names obtaining, you should catch the id_e_afterShowOpenSaveDialog event.
Cheers,
Alex
As for the file names obtaining, you should catch the id_e_afterShowOpenSaveDialog event.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
HI Alex,
Are you saying I cannot get the info under what file name the optimized document will be saved?
-žarko
Are you saying I cannot get the info under what file name the optimized document will be saved?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hello žarko,
Check my previous post.
Cheers,
Alex
Check my previous post.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi Alex,
Sorry, that post didn't show up for me before asking the last question.
Anyhow, I cannot locate that event in the list of events.
I can catch "e.document.askForSaveDest" but it states it gets fired *before asking for save destination* .
-žarko
Sorry, that post didn't show up for me before asking the last question.
Anyhow, I cannot locate that event in the list of events.
I can catch "e.document.askForSaveDest" but it states it gets fired *before asking for save destination* .
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi zarkogajic,
Strange that it's not there - try catching it anyway. If you do, try casting it to the IPXV_ShowOpenSaveDialogEvent.
Cheers,
Alex
Strange that it's not there - try catching it anyway. If you do, try casting it to the IPXV_ShowOpenSaveDialogEvent.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Hi Alex,
Yes, I can catch this event "e.afterShowOpenSaveDialog", however, no such interface to cast into
-ž
Yes, I can catch this event "e.afterShowOpenSaveDialog", however, no such interface to cast into
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI SOLVED
Hi zarkogajic,
Added it - that interface should be available from the next release.
Cheers,
Alex
Added it - that interface should be available from the next release.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
Thanks Alex.
I'll close the topic.
-ž
I'll close the topic.
-ž
- Will - Tracker Supp
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
- Location: London, UK
- Contact:
Re: Save As Optimized (+PDFOptimizer.pvp plugin) - document saved but appears as not saved in UI
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
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com