Opening File from URL

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

doiley
User
Posts: 6
Joined: Thu May 07, 2009 2:44 am

Opening File from URL

Post by doiley »

Hi there,

I am currently evaluating the sdk for our company and i have a few concerns/questions.

The first one is relating to opening a pdf from a url location. The application seems to 'download' the pdf to "My Documents" and then upon closing the document, it is still present in "My Documents". Is this normal behaviour? Is there another way I can open a document from a url (webdav folder to be precise) without the document being 'downloaded' into "My Documents" or is there a way to at least change this location and/or possibly delete the file?

Secondly, looking at the test/sample application "Commands", on the list some of the commands are in a 'disabled' state. Am I right to assume this isn't the case in the licensed version?

Thanks
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2449
Joined: Thu Jun 30, 2005 4:11 pm

Re: Opening File from URL

Post by Vasyl - PDF-XChange »

The first one is relating to opening a pdf from a url location. The application seems to 'download' the pdf to "My Documents" and then upon closing the document, it is still present in "My Documents". Is this normal behaviour? Is there another way I can open a document from a url (webdav folder to be precise) without the document being 'downloaded' into "My Documents" or is there a way to at least change this location and/or possibly delete the file?
It is normal behavior for end-user program: if you already downloaded the remote document once from a url - you can read this document from a local copy, without downloading it again (i.e. in offline mode).
You can change the destination folder by:

Code: Select all

SetProperty("Documents.DownloadFolder", "<NewDownloadFolderName>", 0);
You can obtain local file name of opened document by:

Code: Select all

String sOut;
GetDocumentProperty(DocID, "FileName", sOut, 0);
and you can delete this file:

Code: Select all

CloseDocument(DocID); // document should be closed before
DeleteFile(sOut); // Windows API
Secondly, looking at the test/sample application "Commands", on the list some of the commands are in a 'disabled' state. Am I right to assume this isn't the case in the licensed version?
It is normal behavior also, because some commands can be used in special runtime modes only. For example: the command 'Print' will be enabled when at least one document is opened. All commands are available for unlicensed version, but when you save any document via our SDK, and if SDK is unlicensed, then saved document will contain demo version watermarks on each page.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.