Of course we could always just leave it at that — a link. But we could also embed the PDF directly into the page. Our site uses Google Doc Embedder, a WordPress plugin that permits embedding of PDF, PPT and TIF files. I follow the instructions on its documentation page, embedding a shortcode which looks something like this: [ gview width=”600″ height=”600″ file=”https://ems.andrew.cmu.edu/2010spring/wp-content/uploads/2010/01/golan_noll.pdf” ]
Note that the extra spaces around the brackets have to be removed for this to work correctly.
Note that this plugin uses the Google Doc renderer for PDF, which doesn’t render graphics as nicely as Acrobat.
Here’s a demo of a Flash upload and embedding in the blog. It’s a little easier than the Java applet. For this demo, I’m using one of Adobe’s free demo example programs.
Instructions:
First, I remembered to create a project whose filename included my name and my project number (and as a precaution, had no capital letters).
I Published (exported) my program, from Flash (Shift-F12 or File->Publish).
I logged into the blog and chose to “Add New” Post (not Page).
I used the Upload/Insert “Add Media” button (8-pointed star) to upload my .SWF file. Before closing the Uploader window, I made a note of its storage location URL, which looks like this: https://ems.andrew.cmu.edu/2010spring/wp-content/uploads/2010/01/3_graphics.swf
This blog has installed the Kimili Flash Embed Plugin, about which you can read more here. In the Post Editor, you will see either a red Flash button (in Visual mode), or a “Kimili Flash Embed” button (in HTML mode). Press this button, and you will now be editing the Kimili Tag Generator.
Paste the storage location URL into the field labeled “Flash (.swf)”, which currently has “untitled.swf”.
Enter the dimensions of your Flash program into the “Dimensions” fields, and press the Generate button. This will insert some text beginning with [kml …. ] into your blog post.
I remembered to Categorize my blog Post with an appropriate category, e.g. Project-0.
I also uploaded a zip archive of my entire Flash project, for archival purposes, which I linked in here: flash_as3_sample_drawing_3.zip.
Before I exported my applet, I gave my sketch a good name, like “golan-demo”.
This project name is good because it contains no caps, no spaces,
and because it includes my name and project title.
I edited my applet’s HTML file so that the div margins were 0 (zero).
I also renamed my applet’s HTML file to “golan-demo.html” instead of “index.html”.
Then I uploaded the files to the blog, and edited the post:
I uploaded the applet’s HTML file. I copied the URL that was generated by WordPress for the uploaded asset: https://ems.andrew.cmu.edu/2010spring/wp-content/uploads/2010/01/golan-demo.html
I also uploaded my project’s .jar file, the “loading.gif”, and the Archive zip of my project.
Then I inserted the IFRAME HTML code, in the post’s HTML editing mode.
It looked like this:
Once you add the IFRAME code, It’s important to never edit this post again in “Visual” mode (non-HTML), or else the IFRAME code will get accidentally clobbered by WordPress, which is sucky.