Sometime you may want to provide files on your site that visitors can download. They might be zip files, pdf files or xls files, or indeed any other kind of file you can think of -- and that your host will accept! In this tutorial, we cover:
Introduction The usual way is to provide a file link to the file. This can be from inside or outside a text object, from an image or any other kind of object.
In this tutorial we will look at linking to a pdf file called Simple2.pdf. Obviously, change the name to match that of your pdf file. The principles here also apply to files of other types.
To preview in IE8, uncheck the "Mark Preview as Internet Zone" in SiteSpinner Options > Preview Options.
What happens to the file at your visitor's computer is entirely up to them. If the Adobe Acrobat Reader (for pdf files) is installed on their computer, then the reader will open, and (we hope!) be nicely integrated with the browser.
If not, they will get a message saying the browser does not know how to handle pdf files and your visitor will then control what happens to the file.
If the above Simple.pdf link does not work in preview in IE8, the IE8 security settings may be the cause. If so, turn "Mark Preview as Internet Zone" off in Options > Preview Options.
Mention pdf file size To help your visitor decide whether to download your file, always mention that it is a pdf file and the file size. As we did in the example above -- not all pdf files are this small!
Where does the linked pdf hang out on your site? The pdf file is just like any other file.The publisher treats it as an "External File" and by default, places it in the root folder of your site. For more, see Publisher Sub Folders -- you can change the file location with the "External Files" setting.
Embedding the pdf file
You can embed the pdf file in your page as an Import Object. This is a much tougher ask than the simple link above. If things don't work out right at your visitor's end, they may see a big blank space if the Adobe plug-in is not installed. Or they can get a cryptic error message, and of course, the pdf file still won't display.
But if you want to try embedding a pdf, here are the steps:
Click the "Embed a File or Media" (Import Object) button
For Format, set Other File Type
Click the FilePath button and find your file (see the image below)
Press OK
Position the bounding box to where you want the file to appear.
Size the the bounding box to the size of the pdf window
Use the Relative Size buttons on the Arrange toolbar if you want it to stretch with the browser width
Now you can preview and (may!) have your file embedded in the page. This depends on how your browser and Adobe reader is set up
When you publish, if you choose Gather mode, SiteSpinner will copy the file to your server
Below, the pdf file should be embedded in your page. Preview to see it.
Where does the embedded pdf hang out on your site?
The file is embedded into your page as an Other File Type. The publisher treats this file as an "Other Foreign Object" -- see Publisher Sub Folders. Therefore, the default is for the file to be placed in the media folder of your publish directory. However, you can change that with the "Other Foreign Objects" setting of the sub-folders list. See also the Import Objects tutorial: Format Type vs Publish Folder.
Compare with the simple file link where the default location for the file is the root folder of your site.