[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GMG-Devel] PDF support

From: Sebastian Spaeth
Subject: [GMG-Devel] PDF support
Date: Thu, 08 Nov 2012 13:52:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7

Hi all,
here is my first and rough cut at a PDF supporting media handler.

This is commit 566fdd79e3bf44cf92e2cada4bf987fee10b4fde in my branch media_handler_pdf at git://

Patch was too big to be attached, see here:

Some comments on the state of things:

Uploading of PDF works. So far, downloading does not work, as I simply use the "image preview" template and that attempts to stick the pdf in a <img> tag, but that's only a matter of creating a PDF specific template.

What remains to be done:
  - the gallery object template somewhere prefixes "/mgoblin_media" to
    the thumbnail URL, even if we want the default thumbnail starting
    with a "/mgoblin_static" URL. THis prevents the default thumbnail
    from being displayed at the moment.
  - Create a HTML template that suits PDF file better
  - Actually extract some metadata from the file (author, description,
    created on, created with, ....)
  - Display the real first page as a thumbnail, needs converter
  - The thumbnail icon is hardcoded for now. This needs to get the value
    from ./['default_thumb'] but I don't know
    how to access that value from

Longterm: Use pdf.js to actually display the PDF file?!

I am giving up for now, but I think merging in this code post-release would be a good foundation to get something better going. My biggest roadblock is the auto-prefixing of "/mgoblin_media" somewhere and I need to track that down.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]