PDF Instance, Memory or Disk ?!

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

PDF Instance, Memory or Disk ?!

Post by Rad1 »

Hello,

I'm currently evaluating the ActiveX PDF display control for possible inclusion in our products. One of the main caracteristic we are looking for is the ability to display a PDF from an instance that resides in memory instead of a file on disk. This is to fulfill a security requirements we have.

Is this possible with PDF XChange ActiveX control ?

Whene I open a document from an URL, the Control place a copy on HD. How can I disable it if is possibl ? else, how can I change the path whene I open a document from URL,(default is Mydocument) ?

Thanks for response.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: PDF Instance, Memory or Disk ?!

Post by Corwin - Tracker Sup »

You can open document from memory stream (IStream interface). First you need to set "Documents.UseStreamsDirectly" property to "true" and then call OpenDocument function with IStream object.

You can set directory where to put downloaded PDF files by specifying "Documents.DownloadFolder" property:

Code: Select all

PDFView.SetProperty("Documents.DownloadFolder", "C:\\pdfs\\")
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: PDF Instance, Memory or Disk ?!

Post by Rad1 »

Thank you very much, the set directory work well.

But, I can't open documents directly without saving on disk. My code is :

Code: Select all

PDFView.SetProperty("Documents.UseStreamsDirectly", "true", 0)

PDFView.OpenDocument("http://testurl/testdoc.pdf","",0);
I don't understand how to open document with IStrem Object.

Thank you for help Corwin
regards
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: PDF Instance, Memory or Disk ?!

Post by Rad1 »

I forgot to tell you that I need to edit the file opened in IStream, and save changes. All this without leaving a trace on the disk.

Thanks.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: PDF Instance, Memory or Disk ?!

Post by Corwin - Tracker Sup »

I'm not familiar with Java to provide you samples of working with Java streams...
For some help you may look at next articles:
Class InputStream
Working with Streams in Java
PDFView.OpenDocument("http://testurl/testdoc.pdf","",0);
That won’t work. First you need to download document to IStream object, and then pass this object to OpenDocument function.
I forgot to tell you that I need to edit the file opened in IStream, and save changes. All this without leaving a trace on the disk.
If you opened document with IStream (and "UseStreamsDirectly" is enabled) then all changes in the document will be saved to this stream.
Last edited by Corwin - Tracker Sup on Mon May 18, 2009 1:11 pm, edited 1 time in total.
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: PDF Instance, Memory or Disk ?!

Post by Rad1 »

YES, Thank you for help friend.
Regards