Fix test.
[librarian.git] / librarian / pdf.py
index af258fc..12c07ea 100644 (file)
@@ -206,7 +206,7 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
         if cover:
             if cover is True:
                 cover = DefaultEbookCover
-            bound_cover = cover(book_info)
+            bound_cover = cover(book_info, width=1200)
             root.set('data-cover-width', str(bound_cover.width))
             root.set('data-cover-height', str(bound_cover.height))
             if bound_cover.uses_dc_cover:
@@ -230,8 +230,10 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
             root.set('customizations', u','.join(customizations))
 
         # add editors info
-        root.set('editors', u', '.join(sorted(
-            editor.readable() for editor in document.editors())))
+        editors = document.editors()
+        if editors:
+            root.set('editors', u', '.join(sorted(
+                editor.readable() for editor in editors)))
         if document.book_info.funders:
             root.set('funders', u', '.join(document.book_info.funders))
         if document.book_info.thanks:
@@ -267,7 +269,7 @@ def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
 
         if cover:
             with open(os.path.join(temp, 'cover.png'), 'w') as f:
-                bound_cover.save(f)
+                bound_cover.save(f, quality=80)
 
         del document # no longer needed large object :)