Pdf printer for use with putty

HI all. I am a functional user of Linux coming from Windows. The company I work for has software that requires an SSH program to run. We use Putty and a fork called Kitty. One of the options the software allows is print to PDF in the terminal settings. Windows offers a drop down feature to choose the printer. The linux version does not have this option. I did find a command in my search that lets you add a printer manually with “lp -dprintername”. So I managed to find a command to install a pdf printer with cups so I could choose it to print to. That lead me to find that it gets saved to a folder I cannot access /var/spool/cups. That article said I could change the save location by editing /etc/cups/cups-pdf.conf file. I attempted to edit the file but it would not let me change it as I didn’t have sufficient rights to change. My first questions are if I am admin of this box, how can I not have sufficient rights and second can I put in a path to a desktop folder like /home/desktop/pdffiles? Look forward to the answers.

as I could not read the wall of text
I copy/pasted it to my editor and structured it as I went along

This is the result:

HI all.
I am a functional user of Linux coming from Windows.
The company I work for has software that requires an SSH program to run.
We use Putty and a fork called Kitty.
One of the options the software allows is print to PDF in the terminal settings.
Windows offers a drop down feature to choose the printer.

The linux version does not have this option.

I did find a command in my search that lets you add a printer manually with “lp -dprintername”.
So I managed to find a command to install a pdf printer with cups so I could choose it to print to.

That lead me to find that it gets saved to a folder I cannot access /var/spool/cups.

That article said I could change the save location by editing /etc/cups/cups-pdf.conf file.
I attempted to edit the file but it would not let me change it as I didn’t have sufficient rights to change.

My first questions are if I am admin of this box, how can I not have sufficient rights and second can I put in a path to a desktop folder like /home/desktop/pdffiles?

Look forward to the answers.

@RAGoetz you are welcome :grinning:

This tutorial is helpful. Two questions for clarification. When I attempt to change the location, I am told I do not have permissions to change it. I am the admin. How do I give the correct admin credentials to change it and can I just create a folder on my desktop and give it the proper path, example /home/desktop/pdf prints? Thanks for your advice.


Moderator edit: Added link to referenced tutorial

Please clarify - by describing what you do, what you see.

This thread here is two and a half years old, btw.
Better open your own - with problem description and so on and so forth …

Thanks, I’ll start a new one.

the workaround is:
go to where it was stored - and copy it to where you want it

not convenient - but it works :nerd_face:

Thanks for the reply. I have started a new thread per your suggestion. If it is where my reading says it is, I cannot access that folder. /root/var/spool/cups.

but:
it isn’t there :man_shrugging:

you printed it - you can access it

I am open to directions. According to the cups-pdf.conf file,if I am reading it correctly, they are being saved to /var/spool/cups-pdf/$user. That folder has a lock on it and will not open. If I attempt to edit the cups-pdf.conf file, it tells me I do not have sufficient privleges. Did I miss anything?

###########################################################################
#									  #
# Path Settings								  #
#									  #
###########################################################################

### Key: Out (config)
##  CUPS-PDF output directory 
##  special qualifiers: 
##     ${HOME} will be expanded to the user's home directory
##     ${USER} will be expanded to the user name
##  in case it is an NFS export make sure it is exported without
##  root_squash! 
### Default: /var/spool/cups-pdf/${USER}

#Out /var/spool/cups-pdf/${USER}

### Key: AnonDirName (config)
##  ABSOLUTE path for anonymously created PDF files
##  if anonymous access is disabled this setting has no effect
### Default: /var/spool/cups-pdf/ANONYMOUS

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

yes

How do you print?
What program are you using to print from?

for example:
if I print from Firefox, I get a dialogue - I can choose and adapt where to store the .pdf

I have zero problems whatsoever printing to pdf
… or storing output as pdf …

and: yes

check how your posts look

Check and look at what you did (post).

You’d immediately see that something was not right with that one.

I know I would …

Yes, using proper formatting. :wink:

Please edit your reply accordingly: [HowTo] Post command output and file content as formatted text

I going to preface my answer with a little info about the operation in Windows in case anyone else runs into a similar issue. When you install a PDF reader in Windows it may allow you to use it as a PDF printer. Putty allows you to print an ANSI file to a printer. It has a drop down to let you choose the printer. Depending on if you have choosen to have them go to a folder or open a file as default, you can go to the preset folder to view or it may open automaticlly in another window. With the Linux version of Putty, you do not get the drop down and, at least with Manjaro, print to PDF has to be manually set up. I wonder if using a browser would work to open the PDFs. Apparently I mis-formated the command and may not even have the correct command. I wanted to include a screen shot be that’s not allowed.
I will read over some suggestions given.

I have no way to relate anything to any Windows experience.
I factually, literally, did not use any kind of Windows since around 2002

LOL. You have not missed anything, espesially since Win10.

…and I’ve moved your replies from an old, abandoned tutorial there.

Don’t forget, you still need to…

Thanks!

Putty and Kitty are Windows SSH apps. There is a Linux version of Putty if needed. I don’t think it is an issue with Linux per say, just an issue finding the correct command to make it work. All of my physical printers work fine. The issue comes in when I need a virtual PDF printer to send, in this case, a purchase order or any physically printable document to PDF or file. In Windows, I think it uses the PDF program as the program to print with.

Whatever - you may use that.

Thanks for the help here today. It is time to head home for the weekend here. I will work on this some more next week. Hope you have a wonderful weekend.

No worries. FYI, by that time, the window for editing replies will be expired. Therefore, I’ve fixed your formatting for you this time so the helpful volunteers will be able to read it and be more likely to help out. :wink:

You too! :wave: