Questions tagged [pypandoc]

46 questions
14
votes
2 answers

Remove \hypertarget from pandoc LaTex output

I am using pypandoc to convert a markdown file to LaTex. My markdown file has a header, for example: # Header Text # When pypandoc renders the file as a .tex file, this appears as: \hypertarget{header-text}{% \section{Header…
rsgny
  • 565
  • 1
  • 6
  • 17
5
votes
0 answers

convert html table to docx file with pypandoc

Pandoc doesn't render well HTML tables into docx documents. I get the content of a request, I render it using a template file. Then I use pypandoc like this: response = render( request, …
kaligne
  • 3,098
  • 9
  • 34
  • 60
4
votes
2 answers

AttributeError: module 'pypandoc' has no attribute 'convert'

I am trying to switch a python project over to poetry & pyproject.toml. Previously, we were using requirements.txt. When I try to install pyspark 2.4.8 with poetry, however, I hit this error: File "", line 156, in AttributeError:…
goosewill
  • 41
  • 1
  • 2
4
votes
0 answers

convert docx to pdf using pypandoc with BytesIO file path

I want to get docx file from azure blob storage, convert it into pdf and save it again into azure blob storage. I want to use pypandoc to convert docx to pdf. pypandoc.convert_file('abc.docx', format='docx', to='pdf',outputfile='abc.pdf') But, I…
3
votes
2 answers

Pypandoc error , RuntimeError: Pandoc died with exitcode "47" during conversion: b'pdflatex not found

First time posting here,by the way, i've got an issue with this particular line of Python (3.6) code: file_converted = pandoc.convert_file(PATH_TO_ODT, 'pdf', format="odt", outputfile=file_name + ".pdf", extra_args=['--pdf-engine=pdflatex']) When i…
Paul
  • 33
  • 1
  • 4
2
votes
1 answer

Markdown to docx conversion using pypandoc

I have a problem with converting my markdown file to docx file using pypandoc. When I try to convert the file using command: pypandoc.convert_file('container.md', to='docx', outputfile='result.docx'), I get a file with no pictures and a message:…
2
votes
1 answer

Install Pandoc inside Azure Function for Pypandoc

I am using the package pypandoc for converting DOC/DOCX files into HTML. This has a prerequisite of Pandoc being already installed. When both packages are installed using the requirements.txt file, it works locally. When I deploy it as an Azure…
2
votes
1 answer

Docx to pdf using pandoc in python

So I a quite new to Python so it may be a silly question but i can't seem to find the solution anywhere. I have a django site I am running it locally on my machine just for development. on the site I want to convert a docx file to pdf. I want to use…
Kitchen
  • 73
  • 1
  • 2
  • 7
2
votes
1 answer

Flask cannot find Pandoc on Linux Server (nginx+uwsgi)

Hi just deployed my Flask application on my remote ubuntu server on Digital Ocean following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04 It all works fine except…
Fabio Magarelli
  • 1,031
  • 4
  • 14
  • 47
2
votes
0 answers

Is it possible to set up Pypandoc to convert the file using the same paper size, alignment, table, color, etc from the native Word file?

I have recently installed MacLatex to be able to use the pypandoc in python to convert docx in pdf, but finally it works fine, the problem is the file came in PDF messed up all the alignment, fonts, paper size different from the original file. Is it…
Neto Sena
  • 147
  • 2
  • 5
2
votes
0 answers

Numbered list is not preserved while converting html file to docx file using pypandoc

I am trying to convert my HTML file to docx using pypandoc library of python. But while converting HTML file to docx the numbered list is not preserving in docx file. Numbered List in HTML File: Numbered List in docx file: Here is my code: import…
Bharat Jogdand
  • 438
  • 3
  • 16
2
votes
0 answers

Pandoc converting dict

I am trying to convert an XML file to MarkDown but I can't find an example of converting a python dict. Here is my code: import pypandoc import xmltodict import json datadict = open("/home/.../FIX44.xml") dic = xmltodict.parse(datadict.read())…
Rory Harrison
  • 117
  • 10
2
votes
1 answer

How to convert JSON object to markdown using pypandoc without writing to file?

I am trying to take a response from an API that reports back a JSON object and convert that to a markdown output to present it in a more readable format. I am attempting to use pypandoc to do this and I am having a very time figuring out how to get…
Seth Wahle
  • 166
  • 1
  • 2
  • 12
2
votes
1 answer

PyPandoc in combination with PyInstaller

I installed PyInstaller to create executables for my python scripts, and that works fine. I used PyPandoc to create .docx reports, which also run fine when the normal python files are run, but not from the PyInstaller generated executable. It gives…
Mathias711
  • 6,568
  • 4
  • 41
  • 58
1
vote
0 answers

PYTHON/pypandoc: Can pypandoc be used to convert Rmd files to html?

I'm trying to write python code that can convert an rmd file to html. Rmd was not listed as one of the built in formats for pypandoc, so I tried to use regular markdown for the format parameter. output = pypandoc.convert_file( …
pillow
  • 23
  • 4
1
2 3 4