Skip to content
This repository has been archived by the owner on Oct 21, 2018. It is now read-only.

This adds the button to export the document as PDF #43

Merged
merged 2 commits into from
Oct 11, 2018
Merged

This adds the button to export the document as PDF #43

merged 2 commits into from
Oct 11, 2018

Conversation

anshulxyz
Copy link
Contributor

@anshulxyz anshulxyz commented Aug 19, 2017

This addresses the issue #28

I have used the code that was already present in the templates/index.html and made it to submit
the textarea to the rsted/pdf.py.

I am using flask's request from flask to retrieve the data
of the form.

content = request.form['text']

This change doesn't effect any other aspect of the application.

I am open to any kind of feedback.

спасибо

Add button to export the rst document as PDF.
As requested here, #28 .
Most of the code was already there, I refactored and did small changes.
Give the `textarea` the `form` attibute to attach it to the form id
`save_as_pdf`.
Use Flask's `request.form` to retrieve text using form name.
@837278709
Copy link

Hi, You ever see error msg like this one, "[ERROR] image.py:357 The image (/tmp/tmp7YAqE2.svg, near line UNKNOWN in file UNKNOWN) is broken or in an unknown format" ?

@anshulxyz
Copy link
Contributor Author

No, I have never stumbled upon this error.

@837278709
Copy link

Oh, well in most cases, it works fine, but when I try to transfer this rst file to PDF, there is an error. Besides, I don't see any syntax error in it.

@anru
Copy link
Owner

anru commented Oct 11, 2018

LGTM

@anru anru merged commit 6e8b18a into anru:master Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants