Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pdf creation from cli?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Mon Feb 25, 2013 7:04 pm    Post subject: pdf creation from cli? Reply with quote

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
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Mon Feb 25, 2013 7:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Feb 25, 2013 8:08 pm    Post subject: Reply with quote

lout is good (but not multi-lingual) - not as simple as you'd like, but far more lightweight than texlive.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Feb 25, 2013 9:06 pm    Post subject: Reply with quote

_______0 ...

Not in portage, but text2pdf is perhaps what you're looking for.

best ... khay
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Tue Feb 26, 2013 12:47 am    Post subject: Reply with quote

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
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Tue Feb 26, 2013 1:09 am    Post subject: Reply with quote

I use enscript too. I believe there is also a cups plugin for this.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum