Hi everyone,
I am new to programming. Someone introduced me to VB6 and it worked for me so far in achieving what I want to achieve so far. Until recently, I discovered that I need to save PDF files while it is opened in an embedded form in VB6 application that I wrote. I am using Foxit reader library. I need my users to create bookmarks on the documents they see and allow them to save and replace the document in the same location. However, the file could not be replaced as it is opened by my application. I need the file to be exactly the same name and to be in the same folder for subsequent processing. So saving it as a different filename is not an option for me.
Any ideas how I can allow saving and replacing the files that my users are viewing using the Foxit 1.0 type library?
Thank you.
5 Replies - 472 Views - Last Post: 10 February 2013 - 10:59 AM
#1
Ideas on saving PDF files while opening it in embedded form in vb6
Posted 27 January 2013 - 09:35 AM
Replies To: Ideas on saving PDF files while opening it in embedded form in vb6
#2
Re: Ideas on saving PDF files while opening it in embedded form in vb6
Posted 27 January 2013 - 09:42 AM
Assuming the document is not open in edit-mode (so that you could just save it), I suppose you could:
Save your new version to the temp folder;
Close the open version;
Delete it (probably create a back-up copy firstly though);
Rename the version in the temp folder.
Save your new version to the temp folder;
Close the open version;
Delete it (probably create a back-up copy firstly though);
Rename the version in the temp folder.
#3
Re: Ideas on saving PDF files while opening it in embedded form in vb6
Posted 27 January 2013 - 05:40 PM
andrewsw, on 27 January 2013 - 09:42 AM, said:
Assuming the document is not open in edit-mode (so that you could just save it), I suppose you could:
Save your new version to the temp folder;
Close the open version;
Delete it (probably create a back-up copy firstly though);
Rename the version in the temp folder.
Save your new version to the temp folder;
Close the open version;
Delete it (probably create a back-up copy firstly though);
Rename the version in the temp folder.
Hi Andrew,
Hmm, that might just work. I will try it out and post my results if it worked. By the way, can I choose the mode that I open the PDF in? You mentioned about edit-mode? I open my PDF using something like :
FoxitCtl1.OpenFile Path & Filename
and with that, I can add bookmarks to it but I have to save as, and not save directly. Can I consider that I am in edit-mode?
Thank you.
#4
Re: Ideas on saving PDF files while opening it in embedded form in vb6
Posted 27 January 2013 - 06:30 PM
Quote
I can add bookmarks to it but I have to save as, and not save directly.
Dunno! You'll have to look into the Foxit API. I might guess that there is a second argument:
FoxitCtl1.OpenFile Path & Filename, "something else here?"
But, reading around a little, I get the impression that you might have to save-as. (Although, when I open a document in Foxit and add a comment I can just press Save?!)
Personally, I might consider the approach I outlined above, as I could leave the copy in the temp folder and retrieve it if necessary.
This post has been edited by andrewsw: 27 January 2013 - 06:31 PM
#5
Re: Ideas on saving PDF files while opening it in embedded form in vb6
Posted 05 February 2013 - 06:42 AM
andrewsw, on 27 January 2013 - 06:30 PM, said:
Quote
I can add bookmarks to it but I have to save as, and not save directly.
Dunno! You'll have to look into the Foxit API. I might guess that there is a second argument:
FoxitCtl1.OpenFile Path & Filename, "something else here?"
But, reading around a little, I get the impression that you might have to save-as. (Although, when I open a document in Foxit and add a comment I can just press Save?!)
Personally, I might consider the approach I outlined above, as I could leave the copy in the temp folder and retrieve it if necessary.
Hi Andrew,
I wish that you are right with
FoxitCtl1.OpenFile Path & Filename, "something else here?"
but apparently, it does not have any as far as I can tell. I been trying to find more info regarding Foxit when used in an embedded form, with not much luck so far.
I am still testing the temp folder idea and I know it should work, it is just not as convenient both to the user and to myself.
Thanks again.
#6
Re: Ideas on saving PDF files while opening it in embedded form in vb6
Posted 10 February 2013 - 10:59 AM
Robert1982, on 27 January 2013 - 10:35 AM, said:
Hi everyone,
I am new to programming. Someone introduced me to VB6 and it worked for me so far in achieving what I want to achieve so far. Until recently, I discovered that I need to save PDF files while it is opened in an embedded form in VB6 application that I wrote. I am using Foxit reader library. I need my users to create bookmarks on the documents they see and allow them to save and replace the document in the same location. However, the file could not be replaced as it is opened by my application. I need the file to be exactly the same name and to be in the same folder for subsequent processing. So saving it as a different filename is not an option for me.
Any ideas how I can allow saving and replacing the files that my users are viewing using the Foxit 1.0 type library?
Thank you.
I am new to programming. Someone introduced me to VB6 and it worked for me so far in achieving what I want to achieve so far. Until recently, I discovered that I need to save PDF files while it is opened in an embedded form in VB6 application that I wrote. I am using Foxit reader library. I need my users to create bookmarks on the documents they see and allow them to save and replace the document in the same location. However, the file could not be replaced as it is opened by my application. I need the file to be exactly the same name and to be in the same folder for subsequent processing. So saving it as a different filename is not an option for me.
Any ideas how I can allow saving and replacing the files that my users are viewing using the Foxit 1.0 type library?
Thank you.
Well, you could make a temporary copy and open that, then when you save, delete the temporary copy and replace the permanent one. That way, the actual file will never be opened by your application.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|