How shall I generate a pdf file instead of a ps file using enscript?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I was wondering why the following generates a ps file not a pdf file?
How can I make it generate a pdf file? Thanks.
$ enscript -B -PPDF code/bloom.c -o bloom.pdf
[ 2 pages * 1 copy ] left in bloom.pdf
$ file bloom.pdf
bloom.pdf: PostScript document text conforming DSC level 3.0
I have already installed cups-pdf by
sudo apt install cups-pdf
pdf ps printing cups enscript
add a comment |Â
up vote
4
down vote
favorite
I was wondering why the following generates a ps file not a pdf file?
How can I make it generate a pdf file? Thanks.
$ enscript -B -PPDF code/bloom.c -o bloom.pdf
[ 2 pages * 1 copy ] left in bloom.pdf
$ file bloom.pdf
bloom.pdf: PostScript document text conforming DSC level 3.0
I have already installed cups-pdf by
sudo apt install cups-pdf
pdf ps printing cups enscript
You might want to pipe the output tops2pdf
.
â Mark Plotnick
47 mins ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I was wondering why the following generates a ps file not a pdf file?
How can I make it generate a pdf file? Thanks.
$ enscript -B -PPDF code/bloom.c -o bloom.pdf
[ 2 pages * 1 copy ] left in bloom.pdf
$ file bloom.pdf
bloom.pdf: PostScript document text conforming DSC level 3.0
I have already installed cups-pdf by
sudo apt install cups-pdf
pdf ps printing cups enscript
I was wondering why the following generates a ps file not a pdf file?
How can I make it generate a pdf file? Thanks.
$ enscript -B -PPDF code/bloom.c -o bloom.pdf
[ 2 pages * 1 copy ] left in bloom.pdf
$ file bloom.pdf
bloom.pdf: PostScript document text conforming DSC level 3.0
I have already installed cups-pdf by
sudo apt install cups-pdf
pdf ps printing cups enscript
pdf ps printing cups enscript
edited 1 hour ago
asked 1 hour ago
Tim
23.3k66228411
23.3k66228411
You might want to pipe the output tops2pdf
.
â Mark Plotnick
47 mins ago
add a comment |Â
You might want to pipe the output tops2pdf
.
â Mark Plotnick
47 mins ago
You might want to pipe the output to
ps2pdf
.â Mark Plotnick
47 mins ago
You might want to pipe the output to
ps2pdf
.â Mark Plotnick
47 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
According to enscript manpage
- by default, enscript only makes postscipt file*.
From The Command Line. It looks like your command is missing the flag -p :
enscript -B -PPDF code/bloom.c -p myfile.ps
You can then convert the ps file to pdf with ghostscript:
sudo apt install ghostscript
ps2pdf myfile.ps myfile.pdf
or
enscript file -o - | ps2pdf - output.pdf
You have to set your default Printer in the system to the PDF printer, so enscript will then send all output to a PDF file. If it is not the default. then the output will be a postscipt file. I would then use something like this command:
enscript -2 -r -j --font=Times-Roman11 --word-wrap --mark-wrapped=arrow '%f' && sleep 2 && evince ~/PDF/_stdin_.pdf
Command explanation:
The `%f` designates the filename parameter. To make it work in the [Geany editor][3], IâÂÂve found that it must be typed in single quotes.
The `&& sleep 2 && evince ~/PDF/_stdin_.pdf` commands will wait two seconds for the print job to finish, then run the Evince PDF viewer to display the file _stdin_.pdf you just generated in the userâÂÂs PDF subdirectory.
Thanks. Why does-PPDF
not make it create pdf file directly? Is it the case on your linux?
â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does-PPDF
already specify the printer to be the PDF printer?
â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
 |Â
show 5 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
According to enscript manpage
- by default, enscript only makes postscipt file*.
From The Command Line. It looks like your command is missing the flag -p :
enscript -B -PPDF code/bloom.c -p myfile.ps
You can then convert the ps file to pdf with ghostscript:
sudo apt install ghostscript
ps2pdf myfile.ps myfile.pdf
or
enscript file -o - | ps2pdf - output.pdf
You have to set your default Printer in the system to the PDF printer, so enscript will then send all output to a PDF file. If it is not the default. then the output will be a postscipt file. I would then use something like this command:
enscript -2 -r -j --font=Times-Roman11 --word-wrap --mark-wrapped=arrow '%f' && sleep 2 && evince ~/PDF/_stdin_.pdf
Command explanation:
The `%f` designates the filename parameter. To make it work in the [Geany editor][3], IâÂÂve found that it must be typed in single quotes.
The `&& sleep 2 && evince ~/PDF/_stdin_.pdf` commands will wait two seconds for the print job to finish, then run the Evince PDF viewer to display the file _stdin_.pdf you just generated in the userâÂÂs PDF subdirectory.
Thanks. Why does-PPDF
not make it create pdf file directly? Is it the case on your linux?
â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does-PPDF
already specify the printer to be the PDF printer?
â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
 |Â
show 5 more comments
up vote
5
down vote
According to enscript manpage
- by default, enscript only makes postscipt file*.
From The Command Line. It looks like your command is missing the flag -p :
enscript -B -PPDF code/bloom.c -p myfile.ps
You can then convert the ps file to pdf with ghostscript:
sudo apt install ghostscript
ps2pdf myfile.ps myfile.pdf
or
enscript file -o - | ps2pdf - output.pdf
You have to set your default Printer in the system to the PDF printer, so enscript will then send all output to a PDF file. If it is not the default. then the output will be a postscipt file. I would then use something like this command:
enscript -2 -r -j --font=Times-Roman11 --word-wrap --mark-wrapped=arrow '%f' && sleep 2 && evince ~/PDF/_stdin_.pdf
Command explanation:
The `%f` designates the filename parameter. To make it work in the [Geany editor][3], IâÂÂve found that it must be typed in single quotes.
The `&& sleep 2 && evince ~/PDF/_stdin_.pdf` commands will wait two seconds for the print job to finish, then run the Evince PDF viewer to display the file _stdin_.pdf you just generated in the userâÂÂs PDF subdirectory.
Thanks. Why does-PPDF
not make it create pdf file directly? Is it the case on your linux?
â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does-PPDF
already specify the printer to be the PDF printer?
â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
 |Â
show 5 more comments
up vote
5
down vote
up vote
5
down vote
According to enscript manpage
- by default, enscript only makes postscipt file*.
From The Command Line. It looks like your command is missing the flag -p :
enscript -B -PPDF code/bloom.c -p myfile.ps
You can then convert the ps file to pdf with ghostscript:
sudo apt install ghostscript
ps2pdf myfile.ps myfile.pdf
or
enscript file -o - | ps2pdf - output.pdf
You have to set your default Printer in the system to the PDF printer, so enscript will then send all output to a PDF file. If it is not the default. then the output will be a postscipt file. I would then use something like this command:
enscript -2 -r -j --font=Times-Roman11 --word-wrap --mark-wrapped=arrow '%f' && sleep 2 && evince ~/PDF/_stdin_.pdf
Command explanation:
The `%f` designates the filename parameter. To make it work in the [Geany editor][3], IâÂÂve found that it must be typed in single quotes.
The `&& sleep 2 && evince ~/PDF/_stdin_.pdf` commands will wait two seconds for the print job to finish, then run the Evince PDF viewer to display the file _stdin_.pdf you just generated in the userâÂÂs PDF subdirectory.
According to enscript manpage
- by default, enscript only makes postscipt file*.
From The Command Line. It looks like your command is missing the flag -p :
enscript -B -PPDF code/bloom.c -p myfile.ps
You can then convert the ps file to pdf with ghostscript:
sudo apt install ghostscript
ps2pdf myfile.ps myfile.pdf
or
enscript file -o - | ps2pdf - output.pdf
You have to set your default Printer in the system to the PDF printer, so enscript will then send all output to a PDF file. If it is not the default. then the output will be a postscipt file. I would then use something like this command:
enscript -2 -r -j --font=Times-Roman11 --word-wrap --mark-wrapped=arrow '%f' && sleep 2 && evince ~/PDF/_stdin_.pdf
Command explanation:
The `%f` designates the filename parameter. To make it work in the [Geany editor][3], IâÂÂve found that it must be typed in single quotes.
The `&& sleep 2 && evince ~/PDF/_stdin_.pdf` commands will wait two seconds for the print job to finish, then run the Evince PDF viewer to display the file _stdin_.pdf you just generated in the userâÂÂs PDF subdirectory.
edited 19 mins ago
answered 44 mins ago
Goro
3,21441951
3,21441951
Thanks. Why does-PPDF
not make it create pdf file directly? Is it the case on your linux?
â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does-PPDF
already specify the printer to be the PDF printer?
â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
 |Â
show 5 more comments
Thanks. Why does-PPDF
not make it create pdf file directly? Is it the case on your linux?
â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does-PPDF
already specify the printer to be the PDF printer?
â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
Thanks. Why does
-PPDF
not make it create pdf file directly? Is it the case on your linux?â Tim
36 mins ago
Thanks. Why does
-PPDF
not make it create pdf file directly? Is it the case on your linux?â Tim
36 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
Kindly see the edits ;-)
â Goro
34 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does
-PPDF
already specify the printer to be the PDF printer?â Tim
33 mins ago
How would you " set your default Printer in the system to the PDF printer"? Does
-PPDF
already specify the printer to be the PDF printer?â Tim
33 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
in order to make the PDF printer default, go to the printer configurations GUI for example you installed cups-pdf. You can choose it as a default from the GUI
â Goro
30 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
Is there a reliable command which will work in both cases with or without making the PDF printer default?
â Tim
28 mins ago
 |Â
show 5 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470364%2fhow-shall-i-generate-a-pdf-file-instead-of-a-ps-file-using-enscript%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You might want to pipe the output to
ps2pdf
.â Mark Plotnick
47 mins ago