<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Kai,
<div class=""><br class="">
</div>
<div class=""> 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.</div>
<div class=""><br class="">
</div>
<div class="">Could you let me know your reportlab version?</div>
<div class="">I have:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
$ pip freeze | grep reportlab</div>
<div style="margin: 0px; font-family: Courier; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);" class="">
reportlab==3.2.0</div>
</div>
<div class=""><br class="">
</div>
<div class="">Also, is this a multi-page figure?</div>
<div class="">Are all the panels within a single page?</div>
<div class=""><br class="">
</div>
<div class="">I wonder if the presence of the 19th panel would cause this bug if there were only 1 or 2 of other panels there?</div>
<div class=""><br class="">
</div>
<div class="">If you can reproduce this, especially with a simpler figure that would be great.</div>
<div class=""><br class="">
</div>
<div class="">If you could send me the exported JSON “File > Export as json” that fails, and one that doesn’t, that would be handy</div>
<div class="">(either privately or remove any private names / details).</div>
<div class=""><br class="">
</div>
<div class=""> Cheers,</div>
<div class=""><br class="">
</div>
<div class="">  Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 22 Jan 2018, at 16:28, Kai Schleicher <<a href="mailto:kai.schleicher@unibas.ch" class="">kai.schleicher@unibas.ch</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Dear OME team,<br class="">
<br class="">
first of all, I wish you a happy new year and best of success for 2018!<br class="">
<br class="">
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).<br class="">
<br class="">
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<br class="">
<br class="">
<blockquote type="cite" class="">Traceback (most recent call last):<br class="">
  File "./script", line 1875, in <module><br class="">
    run_script()<br class="">
  File "./script", line 1861, in run_script<br class="">
    file_annotation = export_figure(conn, script_params)<br class="">
  File "./script", line 1818, in export_figure<br class="">
    return fig_export.build_figure()<br class="">
  File "./script", line 704, in build_figure<br class="">
    self.save_figure()<br class="">
  File "./script", line 1372, in save_figure<br class="">
    self.figure_canvas.save()<br class="">
  File "/home/omeronas/omeroweb/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 1237, in save<br class="">
    self._doc.SaveToFile(self._filename, self)<br class="">
  File "/home/omeronas/omeroweb/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 211, in SaveToFile<br class="">
    raise RuntimeError("class %s instances can only be saved once" % self.__class__.__name__)<br class="">
RuntimeError: class PDFDocument instances can only be saved once<br class="">
</blockquote>
<br class="">
Is there maybe a limitation concerning the amount of pixels/images?<br class="">
<br class="">
I also attached an example Blitz0.log file when running the PDF export from the Figure file in question.<br class="">
<br class="">
Thank you for your help and cheers,<br class="">
Kai<br class="">
<br class="">
-- <br class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22 50 (central)<<<br class="">
</blockquote>
</blockquote>
Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |<br class="">
Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) | <a href="mailto:kai.schleicher@unibas.ch" class="">
kai.schleicher@unibas.ch</a> | <a href="http://www.biozentrum.unibas.ch" class="">
www.biozentrum.unibas.ch</a> | <a href="http://www.microscopynetwork.unibas.ch" class="">
www.microscopynetwork.unibas.ch</a><br class="">
<br class="">
<span id="cid:DB1324D3-C1DD-40E0-A4E5-C38FB963DD15@lifesci.dundee.ac.uk"><OMERO_ExportPDF_Error_Blitz.log></span>_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>