Integrating iPaper

I'm attempting to integrate the iPaper platform with my Omeka site to display pdf and word documents. However, I seem to have a problem. I've written the iPaper folks, but maybe someone at Omeka can help to.

I've used the instructions on this page:

http://www.scribd.com/platform/documentation/quickswitch

Choosing "single link" and "Embedded iPaper directly on page."

Where it says to insert the URL of the file, I've used the code:

<?php echo file_download_uri($item); ?>

(this is on the show.php file in the minimalist template).

You can see the page here:

http://kerim.joyeurs.com/omeka/items/show/1

Right now there is no link at all where this code appears - although everything looks good when I look at the source code of the resulting HTML page.

Any help would be appreciated. They do say it might take some time to appear - but they also say a regular link to the document should appear until the iPaper is ready... So far I have neither.

Hello kerim. We want Omeka to work with as many APIs as possible, so this issue is important to our continuing development. Unfortunately I've not been able to make iPaper work in my Omeka installation either. I went as far as to write an Omeka plugin that dynamically includes the scripts in the item show page. I got the same result: valid source code but no output. I'll look further into it, but for now I have no solution.

Thanks for getting back to me. And glad to know you are looking into it.

Do you know of any other ways to display documents inline on Omeka webpages?

I'm trying to emulate this excellent web archive using Omeka (since my server doesn't support Java and I'm much more comfortable with PHP apps):

http://www.sudanarchive.net/

I had hoped that iPaper + Omeka would do the trick ... but maybe there is another way?

So far the only thing I can find that is similar is http://pdfmenot.com however, that requires a link ending in ".pdf" and doesn't seem to work with Omeka's links which look like ".../omeka/files/download/1/fullsize." Also, iPaper can do .doc files which pdfmenot cannot. And iPaper seems as if it will be around for a while, whereas pdfmenot may not. Still, I suppose it could be easy enough to switch from one solution to another using a plugin, and I could convert all our .doc files to PDFs if need be... but I still don't know how to deal with the need for ".pdf" links...

Using the emed codes from both Scribd and PDFmenot I am able to hard-code PDFs into my site. So it seems it should be possible to get iPaper platform to work as well. iPaper is better because it offers search...

Problem solved!!!

From the iPaper Forums:

Hi Kerim,
Oops! You caught a bug on our side. The QuickSwitch page was
showing an invalid embed code in that mode, missing a "div" tag.
If you re-copy the code from the QuickSwitch page now, it should
work. Very cool to see iPaper being used in Omeka!
Best,
Jared

kerim: OK, I finally got iPaper working in my Omeka installation. All that was needed was an empty div tag with an id of "embedded_doc" -- this is where the the iPaper is embedded. This div tag was not included in the QuickSwitch installation instructions for several days, but it's there now.

If you wait a few days you can download the Omeka iPaper plugin that I just wrote. It's fully configurable within the Omeka admin interface and displays iPapers on the admin item show page (with a simple function call you can add the same functionality to your public themes).

Thanks for initiating this interesting and much needed plugin.

Wow, it was you who got them to fix it. Great job!

I seem to be running into a new problem now. The code I was using worked fine as long as:

<?php echo file_download_uri($item); ?>

$item was the same as the number of the file I was downloading. However, later I added some files and deleted some more ... so when I upload a new file the file number is 9, even though the item number is still 3. Now iPaper cannot find the correct link because there is no file at:

http://kerim.joyeurs.com/omeka/files/download/4/fullsize

The file should be at:

http://kerim.joyeurs.com/omeka/files/download/9/fullsize

How do I fix this?

Thanks!

Instead of:

<?php echo file_download_uri($item); ?>

Try:

<?php echo WEB_FILES . '/' . $item->Files[0]->archive_filename; ?>

This results in a direct link to the first file assigned to the item. (Remember that you can assign more than one file per item.)

This solution still has problems, so I recommend that you wait for the Omeka iPaper plugin I wrote. It's configurable and (relatively) stable, and it'll be ready for download in a couple of days. I'll update this forum topic when it's available.

Instead of:

<?php echo file_download_uri($item); ?>

Try:

<?php echo WEB_FILES . '/' . $item->Files[0]->archive_filename; ?>

This results in a direct link to the first file assigned to the item. (Remember that you can assign more than one file per item.)

This solution still has problems, so I recommend that you wait for the Omeka iPaper plugin I wrote. It's configurable and (relatively) stable, and it'll be ready for download in a couple of days. I'll update this forum topic when it's available.

Thanks. The current site is just a proof-of-concept so its good to have a working link before the plugin is ready. I feel really confident about using Omeka for this project now!

Actually, file_download_uri() is meant to be passed a file rather than an item, so the way it works is like this:

<?php echo file_download_uri($item->Files[0]); ?>

That will work if you only have one file per item.

Otherwise, you should do something like this:

<?php foreach($item->Files as $file): echo file_download_uri($file); endforeach; ?>

I'm not sure it would be nice to have 6 or seven embedded documents on a single page. A better way to do it (for the plugin) would be to display the first one and then have links to the other documents - or perhaps a menu, or just "next" and "previous" links.

I agree that too many iPaper documents on one page would be oppressive (on the eyes and on the bandwidth). Some sort of pagination would be preferable. The first release of the iPaper and PdfMeNot plugins will be without this capability, but we'll look into it for subsequent releases.

Would you (or anybody else) like to make this happen after we release these plugins? It'll be a good way to introduce yourself to Omeka's plugin architecture.

The iPaper and PdfMeNot plugins are all ready for download. See this post for more details.