View previous topic :: View next topic |
Author |
Message |
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Mon Feb 25, 2013 7:04 pm Post subject: pdf creation from cli? |
|
|
hi,
Is it possible create pdfs quickly from command line, something like with echo? Could be like 'echo 'bla bla' | <pdf app> docu.pdf
thanks
ps: what I did was to take a file with firefox and print it to pdf. Not the most elegant option... |
|
Back to top |
|
|
cryptosteve Veteran
Joined: 04 Jan 2004 Posts: 1169 Location: GER
|
Posted: Mon Feb 25, 2013 7:29 pm Post subject: |
|
|
untested and may need some improvements ...
Code: | echo "foo" | convert text:- foo.pdf |
edit: convert is part of media-gfx/imagemagick _________________ - born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Feb 25, 2013 8:08 pm Post subject: |
|
|
lout is good (but not multi-lingual) - not as simple as you'd like, but far more lightweight than texlive. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Feb 25, 2013 9:06 pm Post subject: |
|
|
_______0 ...
Not in portage, but text2pdf is perhaps what you're looking for.
best ... khay |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Tue Feb 26, 2013 12:47 am Post subject: |
|
|
The enscript program may do almost exactly what you want: Code: | $ echo foo | enscript -o - | ps2pdf - foo.pdf |
It adds a header and page numbers by default but it is easy to configure these away with ~/.enscriptrc.
edit: If you just want to print the file then it is even easier: Code: | $ echo foo | enscript |
If you are willing to settle for a PostScript file then it is almost as easy: Code: | $ echo foo | enscript -o foo.ps |
Last edited by BitJam on Tue Feb 26, 2013 1:32 am; edited 1 time in total |
|
Back to top |
|
|
dmitchell Veteran
Joined: 17 May 2003 Posts: 1159 Location: Austin, Texas
|
Posted: Tue Feb 26, 2013 1:09 am Post subject: |
|
|
I use enscript too. I believe there is also a cups plugin for this. _________________ Your argument is invalid. |
|
Back to top |
|
|
|