I have a PDF file on a web server, which I would like to open with a FolderItem.
I tried several ways, I thought this is best solution, but it doesn’t work.
dim InputFile as FolderItem
InputFile.URLPath = "http://url.com/druckvorlagen/druckvorlage_formular_04.pdf"
How can I use a FolderItem to open a pdf from an URL?
Are you on the Web Framework or the Desktop Framework?
On the Web Framework you won’t be able to FolderItem.Launch
anything. If you’re on the Desktop Framework, you’ll need to download the PDF to Application Support or Temporary before trying to launch it.
Edit: Yes, I see the post is in the Web category, but the question wasn’t entirely clear.
[quote=363271:@Marcel Zimmer]I have a PDF file on a web server, which I would like to open with a FolderItem.
I tried several ways, I thought this is best solution, but it doesn’t work.
dim InputFile as FolderItem
InputFile.URLPath = "http://url.com/druckvorlagen/druckvorlage_formular_04.pdf"
How can I use a FolderItem to open a pdf from an URL?[/quote]
Not directly. You could use an HTTPSocket to download it to a folderitem, but thats rather indirect.
You really should use shellpath or NativePath.
I’m using the WebEdition [2017.3]
NativePath is difficult because the Xojo -App is not on the same server with the .pdf .
Then youll have to use HTTPSocket or HTTPSecureSocket. Folderitem.url doesnt do what you want.
i solved it with a normal FolderItem, and saving the xojo webapp to the same webserver with the .pdf .