Closed almailer closed 11 years ago
Should also get javascript to provide visual feedback (on drag over) for supported/unsupported mimetypes
Branch iss6_pdfjs addresses this, as exemplified in 3c6d23e. Remaining to be done:
Idea: Handle storage of attributes (e.g. pdf page, pdf zoom) as query string at end of file url, e.g.
pdfbox = row(x,y,w,h,content_type='application/pdf', content_id='/path/to/pdf/file.pdf?page=1&zoom=1.0
I finally realised how to properly do content-type specific parameters in the database.
Separate tables, e.g. content_box, content_image, content_pdf for each content type with a constraint on an id in the boxes table. For example, content_box has two fields, box_id and child_box_id, both of which must be references to boxes.id.
When rendering a box, a left join of boxes on all the content tables (if the convention is used that the table names all begin with content_, then processing db.tables will suffice to find all content tables) will provide all the information on a specific box.
Basic support is now in. You can:
Implement rendering of PDF files on labbook pages.