mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixing pdf generation issue
This commit is contained in:
parent
c462237b9d
commit
b9c0f07f57
1 changed files with 6 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ import logging
|
||||||
import datetime
|
import datetime
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from codecs import open
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
|
@ -16,7 +17,7 @@ from jinja2.exceptions import TemplateNotFound
|
||||||
|
|
||||||
from pelican.contents import Article, Page, Category, is_valid_content
|
from pelican.contents import Article, Page, Category, is_valid_content
|
||||||
from pelican.readers import read_file
|
from pelican.readers import read_file
|
||||||
from pelican.utils import copy, process_translations, open
|
from pelican.utils import copy, process_translations
|
||||||
from pelican import signals
|
from pelican import signals
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -470,7 +471,7 @@ class PdfGenerator(Generator):
|
||||||
output_pdf = os.path.join(output_path, filename)
|
output_pdf = os.path.join(output_path, filename)
|
||||||
# print "Generating pdf for", obj.filename, " in ", output_pdf
|
# print "Generating pdf for", obj.filename, " in ", output_pdf
|
||||||
with open(obj.filename) as f:
|
with open(obj.filename) as f:
|
||||||
self.pdfcreator.createPdf(text=f, output=output_pdf)
|
self.pdfcreator.createPdf(text=f.read(), output=output_pdf)
|
||||||
logger.info(u' [ok] writing %s' % output_pdf)
|
logger.info(u' [ok] writing %s' % output_pdf)
|
||||||
|
|
||||||
def generate_context(self):
|
def generate_context(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue