Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF support #129

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 5 comments
Open

PDF support #129

GoogleCodeExporter opened this issue Apr 18, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

I think having native PDF output support could be useful.

Way better than:
$ txt2tags -t tex filename.t2t
$ pdflatex filename.tex

Original issue reported on code.google.com by mantox...@gmail.com on 4 Sep 2011 at 10:47

@GoogleCodeExporter
Copy link
Author

Hello,

I agree with you , having a direct PDF output could be wonderful !
But there's a technical problem : the general concept of txt2tags is to not 
have dependencies, and a pdf target would probably be wrote with the ReportLab 
library :
http://www.reportlab.com/software/opensource/rl-toolkit/
in the same way as rst2pdf :
http://code.google.com/p/rst2pdf/

By the way, the question is worth asking. I personally think it would be really 
great.

Original comment by fgalla...@gmail.com on 5 Sep 2011 at 1:57

@GoogleCodeExporter
Copy link
Author

I've found this pure python recipe that can convert plain text to pdf (no 
dependencies required):
http://code.activestate.com/recipes/189858-python-text-to-pdf-converter/

Original comment by mantox...@gmail.com on 5 Sep 2011 at 3:58

@GoogleCodeExporter
Copy link
Author

Thanks for the link. This recipe is very limited , but works fine and has a 
good license (GNU GPLv2), so it could help a lot. But this would be a huge 
work. anyone ?

Original comment by galle...@gmail.com on 5 Sep 2011 at 5:10

@GoogleCodeExporter
Copy link
Author

I think nothing can beat LaTeX for pdf rendering. 

But it's true LaTeX is huge to install. 

Instead of reinventing the wheel, I suggest to install wkhtmltopdf: 
https://code.google.com/p/wkhtmltopdf/ which can convert html file using webkit

You can get your pdf this way:
txt2tags -t html file.t2t && wkhtmltopdf file.html file.pdf


Original comment by eforg...@gmail.com on 26 Jul 2012 at 10:37

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

An other program allowing the conversion of html to pdf is weasyprint  
http://www.weasyprint.org


Original comment by jj.sarton@gmail.com on 4 Sep 2014 at 9:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant