51 questions
-1
votes
1
answer
316
views
Page format changes during RTF to PDF conversion using pypandoc
I’m using pypandoc to convert an RTF file to a PDF, but I’m running into an issue where the page structure and formatting are altered during the conversion. It looks like the output PDF is being ...
1
vote
0
answers
50
views
How to maintain order in docx when inserting elements using doc.element.body.append() and high level functions like doc.add_picture()
I am trying to create a Word document that is a mixture of inserting converted markdown strings and images. The file generates, however the markdown elements are included at the very end of the ...
1
vote
1
answer
696
views
How convert table from markdown to restructured text
I am trying to convert a table in markdown format to rst format. I used pandoc and m2r, but the output is the same
import pypandoc
output = pypandoc.convert_file('README.md', 'rst', format='md', ...
2
votes
1
answer
136
views
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.
...
0
votes
1
answer
265
views
Make Pandoc recognize 'ragged right' attribute
I'm converting plenty of documents from Word, LibreOffice and HTML into TeX source. I've encountered this issue that Pandoc is unable to recognize the text being ragged right and thus the text stays ...
7
votes
3
answers
8k
views
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 ...
1
vote
1
answer
3k
views
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'),
...
0
votes
0
answers
217
views
AWS lambda function throws error even after providing all modules
I want to convert .docx file to .txt and If .docx has tables I want to maintain them in good way in .txt file , so I am using pypandoc for this purpose .
In my local this is working like charm.
When I ...
7
votes
0
answers
1k
views
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='...
1
vote
0
answers
901
views
How to wrap raw HTML blocks in markdown
Here is the example markdown code that I'm getting from pandoc:
### Header
Paragraph
- Item
- Item
<table>
//COMPLEX TABLE WITH NESTED CELLS GOES HERE AS RAW HTML//
</table>
Paragraph
...
3
votes
1
answer
978
views
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 ...
3
votes
2
answers
15k
views
Docx to pdf using pandoc in python [closed]
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 ...
0
votes
1
answer
1k
views
Not able to read file in Pypandoc
I am trying to covert a pdf to html using Pandoc. I have installed pandoc binary , added the environment variable path and then using
import pypandoc
import os
os.environ.setdefault('PYPANDOC_PANDOC',...
1
vote
0
answers
1k
views
AttributeError: module 'pandoc' has no attribute 'main'
Python 3.8.2
python -m pip install pandoc
python -m pandoc
After installing pandoc and trying to run it with valid arguments, the following exception pops up.
Traceback (most recent call last):
...
0
votes
1
answer
874
views
pyPandoc md to html conversion lose code-block style
I'm trying to convert a string with markdown formatting into an html
text = """
# To be approved
This is a markdown editor, Type here your article body and use the tools or markdown code to style it....
-1
votes
1
answer
1k
views
pypandoc giving the error “RuntimeError: source_file is not a valid path
My Code:
Error:
$ C:/Users/abc/AppData/Local/Programs/Python/Python38-32/python.exe
e:/PYTHON/pdf_word_converter.py Traceback (most recent call last):
File "e:/PYTHON/pdf_word_converter.py", ...
1
vote
1
answer
616
views
How to convert dotx file to html file in python?
This is my code which failing at the moment
import os
import pypandoc
source_dir = 'source'
result_dir = 'result'
for file in os.listdir(source_dir):
output_files1 = []
source_file = ...
2
votes
0
answers
448
views
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:
...
17
votes
2
answers
5k
views
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{...
1
vote
0
answers
1k
views
pypandoc | Convert multiple files
Objective:
I want to use Pypandoc to create a function where the user inputs three arguments being:
(i) an input folder;
(ii) a file format to convert to; and
(iii) an output folder.
Problem:
...
5
votes
0
answers
3k
views
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( ...
1
vote
0
answers
715
views
how to install throttle module in python3 using terminal?
I am working on web scraping. while reading an e-book I came across this Throttle Module .
It wanted me to import following module :
from chp1.throttle import Throttle
It is showing me the error ...
0
votes
0
answers
2k
views
Pandoc converter : standalone : convert to PDF
I want to know how to use Pandoc in standalone command line manner, to convert existing Excel reports in .xlsx format to PDF.
Hard to find examples on this.
And wondering if it has API interface ...
3
votes
1
answer
16k
views
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 ...
1
vote
0
answers
2k
views
Why is pypandoc giving the error "RuntimeError: Missing format!" in this setup.py script?
I have a setup.py script for a module. This setup.py script features conversion of a Markdown README file to reStructuredText (suitable for PyPI). When an attempt is made to install this module using ...