X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/fe8e5b5e224d32baebbdaa2fecf4a847ed4e5354..f7260ec22a6bcb39fe800ac21f335c2c903a2072:/librarian/parser.py diff --git a/librarian/parser.py b/librarian/parser.py index b2ad98a..fb2f986 100644 --- a/librarian/parser.py +++ b/librarian/parser.py @@ -5,7 +5,6 @@ # from librarian import ValidationError, NoDublinCore, ParseError, NoProvider from librarian import RDFNS, IOFile -from librarian.styles.wolnelektury.cover import WLCover from librarian import dcparser from xml.parsers.expat import ExpatError @@ -205,8 +204,8 @@ class WLDocument(object): return epub.transform(self, *args, **kwargs) def as_pdf(self, *args, **kwargs): - from librarian import pdf - return pdf.transform(self, *args, **kwargs) + from librarian import pypdf + return pypdf.EduModulePDFFormat(self).build(*args, **kwargs) def as_mobi(self, *args, **kwargs): from librarian import mobi @@ -218,6 +217,7 @@ class WLDocument(object): def as_cover(self, cover_class=None, *args, **kwargs): if cover_class is None: + from librarian.styles.wolnelektury.cover import WLCover cover_class = WLCover return cover_class(self.book_info, *args, **kwargs).output_file()