Dev environment URL for content items

Bit of a newbie with Web projects. Am wanting to display PDF file in HTMLviewer but keep getting 404 error. Where should I locate the PDF file so the app can find it when I run it?

Thanks in advance…

I find it best to get the server to display app.ExecutableFile.NativePath, then work back from there.

Use a relative path. Then it doesn’t matter and is always predictable.

Where are you placing the file ?

You may want to use WebFile to provide an URL

Thanks for your replies.

WebFile works (by creating a property of type Webfile object in the App object to hold the reference when showing in the HTMLViewer open event per the help example) provided the mime type of the Webfile object has been set to Application/pdf after the PDF folderitem has been passed to the WebFile object. (Nil object exception of Webfile object if you do so before.)

ForceDownload property is handy if you want the PDF file saved on user’s disk but I want to display on screen.

When ForceDownload is false PDF displays in browser as required but not within the bounds of the HTML viewer even when locked. Guess that’s a PDF app thing…