texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Be able to print from the internal viewer

Open CsatiZoltan opened this issue 6 years ago • 5 comments

This is a feature request. It would be convenient to be able to print directly from the internal viewer.

CsatiZoltan avatar Jun 25 '18 12:06 CsatiZoltan

There used to be a print command in the menu, but it required ghostscript on windows, and people were confused when they did not had ghostscript installed and could not print, so we disabled the command

benibela avatar Jul 07 '18 09:07 benibela

@benibela Isn't ghostscript shipped with MiKTeX?

CsatiZoltan avatar Jul 07 '18 11:07 CsatiZoltan

The printing via ghostscript did not have the same user experience and options as a native print dialog. It was more like a workaround.

Printing is not one of the core features we want to provide. You'll only need it rarely (compared to editing). And you just need one extra click to open the PDF in an external PDF viewer, from which you can then print. Therefore we decided, it's not worth to maintain this feature.

timhoffm avatar Jul 08 '18 16:07 timhoffm

@timhoffm Could be nice for this to be explicit instead of implicit. Maybe some TXS menu could provide an entry "Print PDF" which would display a window briefly explaining what you say here with:

  • a button "Open the PDF with the external viewer" that would open the PDF with the configured external PDF viewer if any and the OS default one if not,
  • a button "Cancel".

dbitouze avatar Jul 08 '18 19:07 dbitouze

On windows, if the user has a program installed which has registered itself to be able to print pdf's, a generic shell command will print the pdf using that program without knowing what the program is. That is what happens if you select "print" from the context menu dialog in windows file explorer for a pdf file. The same thing can be accomplished in powershell (shipped with windows) apparently by Start-Process "path-to-file" -Verb print (https://superuser.com/questions/1613038/how-do-you-print-any-printable-file-in-windows-10-by-command-line)

So, my opinion would be that it would serve the user best if TexStudio checked whether there were such a registered program, and if so hand it the path to the pdf, and if not, tell the user that there is no handler installed in windows for printing pdfs.

That is a trivial amount of code compared to handling the actual printing of pdf's, which I agree should not be a concern for TexStudio.

@timhoffm : It took me 5 clicks to print, and it would have taken more if I had had to open Acrobat first, if I had not known about the feature of printing directly from file explorer.

pbpb avatar Jun 22 '23 00:06 pbpb