Skip to content

PDF & TIFF export in the browser #6

Description

@will-moore

As discussed at #1 & mentioned at JaneliaSciComp/fileglancer#323 (comment)
it would be nice if we can generate a PDF (and TIFF?) in the browser, using the images that have already been generated in the figure app.

I started looking into this a while back at ome/omero-figure#452
using jspdf, which seems to still be a leading contender (last release 6 months ago).

Another option is https://github.com/Hopding/pdf-lib but the last release (and commit) there was 5 years ago.
Also reading this reivew promotes https://github.com/pdfme/pdfme which looks nice. Currently maintained, it uses pdf-lib for PDF generation, wrapped with "template" in JSON.

Scoping of proposed changes:

Current functionalities of Figure_To_Pdf.py script:

  • Generates multi-page PDF (includes "info" page)
  • Creates single TIFF files (single page figure) or multiple TIFF files in a zip (multi-page figures)
  • For both PDF and TIFF options, there you can export "with images" which includes original rendered images from OMERO, along with cropped, rotated, resampled images. Useful for providing journals with info on how images were processed.
  • Export to "Image in OMERO" option that automatically creates a new image from a TIFF (without saving the TIFF)
  • All exports (PDF, TIFF, zips) are saved as annotations on the Image(s) within the figures. The script needs to do this to return the file to the user, so maybe not really a feature.

What would we support/drop?

  • Support multi-page PDF creation
  • Possibly support single TIFF creation? (choose a page at a time to convert) but this would need a whole new export script / library etc.
  • I assume we'd deprecate support for Figure_To_Pdf.py script and export via OMERO scripting service, although we'd have to support this until browser based PDF generation is largely working.

cc @jburel

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions