[ome-users] OMERO.figure: export to PDF fails
William Moore (Staff)
W.Moore at dundee.ac.uk
Mon Jan 22 17:04:09 GMT 2018
Hi Kai,
I just checked and there’s certainly not a limit of 18 panels on a page. Exporting a PDF page with 40 panels worked OK for me.
Could you let me know your reportlab version?
I have:
$ pip freeze | grep reportlab
reportlab==3.2.0
Also, is this a multi-page figure?
Are all the panels within a single page?
I wonder if the presence of the 19th panel would cause this bug if there were only 1 or 2 of other panels there?
If you can reproduce this, especially with a simpler figure that would be great.
If you could send me the exported JSON “File > Export as json” that fails, and one that doesn’t, that would be handy
(either privately or remove any private names / details).
Cheers,
Will.
On 22 Jan 2018, at 16:28, Kai Schleicher <kai.schleicher at unibas.ch<mailto:kai.schleicher at unibas.ch>> wrote:
Dear OME team,
first of all, I wish you a happy new year and best of success for 2018!
Coming to my question, we were contacted by a OMERO.figure user who noticed that the "export to pdf" function failed when too many images are present in the figure (A4, vertical).
To be precises, 18 images á 512x512 pixels can still be exported, while export fails with 19 or more images of the same dimensions, see error logs below
Traceback (most recent call last):
File "./script", line 1875, in <module>
run_script()
File "./script", line 1861, in run_script
file_annotation = export_figure(conn, script_params)
File "./script", line 1818, in export_figure
return fig_export.build_figure()
File "./script", line 704, in build_figure
self.save_figure()
File "./script", line 1372, in save_figure
self.figure_canvas.save()
File "/home/omeronas/omeroweb/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 1237, in save
self._doc.SaveToFile(self._filename, self)
File "/home/omeronas/omeroweb/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 211, in SaveToFile
raise RuntimeError("class %s instances can only be saved once" % self.__class__.__name__)
RuntimeError: class PDFDocument instances can only be saved once
Is there maybe a limitation concerning the amount of pixels/images?
I also attached an example Blitz0.log file when running the PDF export from the Figure file in question.
Thank you for your help and cheers,
Kai
--
Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22 50 (central)<<
Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) | kai.schleicher at unibas.ch<mailto:kai.schleicher at unibas.ch> | www.biozentrum.unibas.ch<http://www.biozentrum.unibas.ch> | www.microscopynetwork.unibas.ch<http://www.microscopynetwork.unibas.ch>
<OMERO_ExportPDF_Error_Blitz.log>_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20180122/0142d1e5/attachment.html>
More information about the ome-users
mailing list