5 Replies - 1156 Views - Last Post: 10 February 2013 - 10:59 AM Rate Topic: -----

#1 Robert1982  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 13

Ideas on saving PDF files while opening it in embedded form in vb6

Posted 27 January 2013 - 09:35 AM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Ideas on saving PDF files while opening it in embedded form in vb6

#2 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3177
  • View blog
  • Posts: 10,639
  • Joined: 12-December 12

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.
Was This Post Helpful? 0
  • +
  • -

#3 Robert1982  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 13

Re: Ideas on saving PDF files while opening it in embedded form in vb6

Posted 27 January 2013 - 05:40 PM

View Postandrewsw, 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.


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.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3177
  • View blog
  • Posts: 10,639
  • Joined: 12-December 12

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

Was This Post Helpful? 0
  • +
  • -

#5 Robert1982  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 13

Re: Ideas on saving PDF files while opening it in embedded form in vb6

Posted 05 February 2013 - 06:42 AM

View Postandrewsw, 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.
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 572
  • View blog
  • Posts: 2,985
  • Joined: 19-May 09

Re: Ideas on saving PDF files while opening it in embedded form in vb6

Posted 10 February 2013 - 10:59 AM

View PostRobert1982, 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.

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1