<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Will,</p>
<p>thanks for you quick reply! Please find my answers in-line:</p>
<p>
<blockquote type="cite">
<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>
</blockquote>
Thanks for testing.</p>
<p>
<blockquote type="cite">Could you let me know your reportlab
version?</blockquote>
$ pip freeze | grep reportlab<br>
reportlab==3.4.0 </p>
<p>we have a higher version, could that be an issue?</p>
<p>
<blockquote type="cite">
<div class="">Also, is this a multi-page figure?</div>
<div class="">Are all the panels within a single page?</div>
</blockquote>
</p>
<p>It is a single-page figure. I also tried dividing the panels on
two pages, but received the same error.</p>
<p>
<blockquote type="cite">I wonder if the presence of the 19th panel
would cause this bug if there were only 1 or 2 of other panels
there?</blockquote>
no, if only 1 or 2 panels are there than the 19th does not cause
the bug. In fact it does not matter <b>which</b> panels are
present or deleted, it just fails if its more than 18. I will sent
you the images in question in a separate email, maybe you can
reproduce the bug this way on your end. <br>
</p>
<p>
<blockquote type="cite">If you can reproduce this, especially with
a simpler figure that would be great.</blockquote>
I did not manage to reproduce it with other data - but I could
reproduce it using the exact same images from the user.<br>
</p>
<p>
<blockquote type="cite">
<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>
</blockquote>
I will include the json files in the separate email together with
the images that cause the bug.<br>
</p>
<p>Thanks again and cheers,<br>
Kai<br>
</p>
<div class="moz-cite-prefix">On 01/22/2018 06:04 PM, William Moore
(Staff) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:D0838D8E-EE39-403E-A15B-E4C69BF5EC92@dundee.ac.uk">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
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=""
moz-do-not-send="true">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="" moz-do-not-send="true">
kai.schleicher@unibas.ch</a> | <a
href="http://www.biozentrum.unibas.ch" class=""
moz-do-not-send="true">
www.biozentrum.unibas.ch</a> | <a
href="http://www.microscopynetwork.unibas.ch" class=""
moz-do-not-send="true">
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="" moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a><br
class="">
<a class="moz-txt-link-freetext" href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ome-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a>
</pre>
</blockquote>
<br>
</body>
</html>