Hi David,

Ultimately you want document preview for PDF.

You can take a look at one approach, using Google Docs Previewer. It embeds
an iframe on your page that makes Google Docs produce images/pages from the
URL of your PDF.
https://wiki.duraspace.org/display/DSPACE/Document+Preview+with+Google+Docs+viewer


You can take a look at a module from @mire that does exactly this:
(module) http://atmire.com/website/?q=modules/ds
(demo)
http://atmire.com/dspace-labs3/pdfpreview/bitstream/handle/123456789/7624/Document%20Streaming.doc?sequence=1


Another interesting concept that I've heard of is Brasiliana's Corisco
DSpace. They have an interceptor/disseminator for PDFs that do some
rendering.
https://github.com/brasiliana/Corisco/blob/master/docs/CoriscoDiagram.png


Here's a link to a previous dspace-tech discussion on this:
http://dspace.2283337.n4.nabble.com/Dspace-tech-anyone-coding-document-streaming-for-DSpace-on-their-own-td3277721.html


If I had to approach this project from scratch, I don't think I would store
the dissemination renditions of the PDF (the JPEGS) into your repository.
Messing with a new bundle for previews is tricky. I would customize the
BitstreamReader to add a dissemination so that the PDF could be converted
to PNG. Then have the ItemViewer request all the PNG-dissemination for the
PDF, instead of the PDF itself. Then you could plop in a
PNG-viewer/gallery/page-turner. The generated PNG's wouldn't be stored in
your DSpace assetstore, but in a temp directory, or just generated on the
fly.


Peter Dietz


On Mon, Jun 10, 2013 at 10:04 AM, David <[email protected]> wrote:

> Hello there list! My name is David and I'm from Argentina.
>
> I am quite new with Dspace (and java) development and I am failing to
> find a solution for my problem.
>
> My client (a library) wants to show pdf files embedded directly in the
> page of the item detail "display-item.jsp". I tried several aproaches
> but non where 100% efective.
>
> I tried:
>     a. Embbeding the pdf in the page using PDF.js but the script doesn't
> work perfectly in IE and Chrome, some (few) files fail to load.
>     b. Embedding the pdf with a reader made with flash. Converting the
> pdf to swf with a custom filter made with pdf2swf. But my client is not
> convinced by flash. He wants something that works with firefox in unix
> as well and flash is certainly dying as a linux/unix friendly
> technology.
>
> So now I had the idea of converting the pdf file to a collection of pngs
> (using pdftoppm) and show the pngs in a custom javascript "gallery". But
> I am not sure if and how can I convert one Bitstream (the pdf file) to a
> collection of Bitstreams (the images) and save them to a bundle. I
> looked at the documentation but it kind of assumes that one wants a 1:1
> conversion. And Google returned nothing.
>
> If someone could help me or give me a trail to follow I would be very
> thankful and of course whatever I end up making I will publish it in my
> git account for the public
>
> I am developing in dspace 1.8.2 (client is already using this version
> and, by now, refuses to upgrade)
>
> Thanks in advance!.
>
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to