Questions tagged [rst2pdf]

rst2pdf.py is a PDF front-end for Docutils that is compatible with the rst2*.py front ends of the Docutils suite. It enables the generation of PDF documents from a reStructuredText source in one step cleaning up intermediate files.

47 questions
1
vote
2 answers

Sphinx: Use a different directive for a different output format

Assume you have a reStructuredText document and want to export it in two formats using Sphinx 2.x: HTML and PDF. You want to put some slightly different contents in these two formats. For example, the text "I am HTML" appears in the HTML version…
Culip
  • 559
  • 8
  • 24
1
vote
1 answer

why does rst2pdf gives TemplateNotFound error when template does exisit?

I am making use of the rst2pdf library to generate a PDF document via Sphinx. However when I attempt to do this I end up with the below error: [exec] sphinx-build -b pdf -d stage/doctrees source/welcome stage/pdf [exec] Running Sphinx v1.8.5 …
DevWithZachary
  • 3,545
  • 11
  • 49
  • 101
1
vote
1 answer

Conda rst2pdf not found although on anaconda.org

I am using anaconda as package manager and tried to install rst2pdf to be able to output a PDF using sphinx for a python program. However I get the following readback when I try to run the published command: conda install -c dfroger…
Mike_H
  • 1,343
  • 1
  • 14
  • 31
1
vote
2 answers

"pip3 list --outdated" item is to keep remaining after "pip3 install -U"

I am using pip3 list --outdated --format=freeze for bulk update of current installed all packages. Recently I noticed one package rst2pdf is to keep remaining after pip3 install -U. I am experiencing this issue with MacOS High Sierra and Ubuntu…
Inetgate
  • 120
  • 1
  • 12
1
vote
1 answer

Why the substitution |version| is not working on Sphinx

I'm new using Sphinx to document my work. I want do add the number version and release to my documentation in PDF. In the conf.py file, a version variable is defined that we can use in the .rst files like such: |version| But its not working for me,…
1
vote
2 answers

How to configure epstopdf for the Sphinx plantuml extension?

I'm trying to get Sphinx on Windows to generate a PDF with the rst2pdf plugin. My reStructuredText files make use of the PlantUML Sphinx extension. When generating a PDF, I get the message SphinxWarning: WARNING: epstopdf command 'epstopdf' cannot…
Frank Kusters
  • 2,544
  • 2
  • 21
  • 30
1
vote
1 answer

rst2pdf : Generate pdf with formulas

I need to generate a report with formulas. I found the library rst2pdf. I like to work with the library, but there was a problem when generating pdf with formulas. To generate a formula I use math role. The following code does not work. The error…
user3698839
  • 21
  • 10
1
vote
1 answer

Calling rst2pdf through subprocess in Django app truncates file

I'm using rst2pdf to generate a formatted pdf file in my Django app. This is the code I'm using to do this: temp_file = tempfile.NamedTemporaryFile(mode='w+t', dir=PDF_PATH, delete=False) temp_pdf = tempfile.NamedTemporaryFile(dir=PDF_PATH,…
buken
  • 206
  • 1
  • 3
  • 11
1
vote
1 answer

highlight lines of code

Does rst2pdf supports line highlighting in source code? Like this: .. code-block:: c :include: example.c :emphasize-lines: 12,15-18 There is default style named pygments-hll that should be used but don't know how.
Bula
  • 1,590
  • 1
  • 14
  • 33
1
vote
1 answer

rst2pdf header / footer text color

How can I change the header / footer text color in the style sheet? I tried, fruitlessly: footer: { parent: normal, alignment: TA_CENTER, textColor: red },
Davoud Taghawi-Nejad
  • 16,142
  • 12
  • 62
  • 82
0
votes
1 answer

How to enforce line wrapping in code-block in rst2pdf?

I have some generated reStructuredText that has code blocks with long lines. Is there a way to enforce line breaks just like normal lines (not in blocks) are wrapped? Here's an example where rst2pdf reduces the font size of the block to make the…
Tortellini Teusday
  • 1,335
  • 1
  • 12
  • 21
0
votes
1 answer

Rst2pdf: Sphinx - Confused file format for defining custom styles

I am confused with multiple resources saying to define custom PDF styles in different ways. What is its file format (.styles or .json)? Here is my current folder structure: /home/sachin/Workspace/Sootballs/pa-amr/docs/.rst2pdf/config/rst2pdf.conf #…
Sushivam
  • 2,537
  • 4
  • 15
  • 25
0
votes
1 answer

Adding header and footer to PDF generated using rst2pdf and spinx

I have inherited a user guide that is built using reStructuredText and Sphinx, from which we want to (and can) produce a PDF using rst2pdf integration with Sphinx. The one thing that we'd like to do is apply custom headers and footers to each page…
0
votes
1 answer

How to have multi-page table row cells converted properly using rst2pdf Shpinx?

I have a table of which one-row cell has so much data that it could span multiple pages in the finally-generated PDF file. rst2pdf ungracefully fails when I feed it my file, with the following output: [ERROR] pdfbuilder.py:161 Failed to build…
0
votes
1 answer

Include multiple images at once using rst2pdf

I'm using rst2pdf to collect several images (named A1.png, A2.png, ... etc) from images folder into one pdf file. to include one image I write the following in file.txt .. image:: images/A1.png then run the following in Linux terminal to convert…