* pypandoc does not work correctly for wkhtmltopdf
@ 2019-05-21 2:55 Jason Wang
[not found] ` <6e792765-708a-4757-81c1-daea98449d76-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2019-05-21 2:55 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2048 bytes --]
pandoc version:
pandoc 2.7.2
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7
pypandoc version:
pypandoc 1.4
pandoc command running successfully
$ pandoc --from=mediawiki IT.mwwiki.txt --pdf-engine=wkhtmltopdf --metadata
pagetitle="XXX" -o xx.pdf
Loading page (1/2)
Printing pages (2/2)
Done
python code
pdoc_args = ['--variable','mainfont=Microsoft
YaHei','--pdf-engine=wkhtmltopdf']
pypandoc.convert_text(wiki_text,'pdf','mediawiki',outputfile=target_file,extra_args=pdoc_args)
debug output:
to: pdf
format: mediawiki
args: ['/usr/bin/pandoc', '--from=mediawiki', '--to=latex',
u'--output=IT.pdf', '--variable', 'mainfont=Microsoft YaHei',
'--pdf-engine=wkhtmltopdf']
pypandoc.convert_text(wiki_text,'pdf','mediawiki',outputfile=target_file,extra_args=pdoc_args)
File "/usr/local/lib/python2.7/dist-packages/pypandoc/__init__.py", line
103, in convert_text
outputfile=outputfile, filters=filters)
File "/usr/local/lib/python2.7/dist-packages/pypandoc/__init__.py", line
331, in _convert_input
'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode,
stderr)
RuntimeError: Pandoc died with exitcode "1" during conversion: pdf-engine
wkhtmltopdf is not compatible with output format latex
if I remove this line
/usr/local/lib/python2.7/dist-packages/pypandoc/__init__.py
#args.append('--to=' + to)
pypandoc generate the corrent pdf
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6e792765-708a-4757-81c1-daea98449d76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 2967 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-22 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21 2:55 pypandoc does not work correctly for wkhtmltopdf Jason Wang
[not found] ` <6e792765-708a-4757-81c1-daea98449d76-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-22 0:26 ` Kolen Cheung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).