How do I change the font size when printing from Eclipse?

12,708

Solution 1

The mismatch of screen font size with printed font size is supposed to be fixed in Eclipse version 3.7 (Indigo). Perhaps you need a newer version of eclipse.

Solution 2

I ended up changing the paper size to A5 and printing to PDF, then printing the PDF to A4.

Solution 3

The best workaround I've found is to copy-and-paste the entire program into a text editor where one can tweak the page/font settings (I use gedit) and print from there. A pain, but less so than changing the font size within Eclipse.

Solution 4

I tried scaling printout to 50-75% and it works for me also: Large font on screen but small font to fit all in less amount of paper

Solution 5

This question was awhile back but I found a work-around to the original question posted. When I select File-Print then a Print menu options comes up (every print menu options is different depending on the OS. This is on a Macbook) I scaled the size of the printing down. Works great to read and more importantly, save trees!:-) Scaling the printing of source code

Share:
12,708
bos
Author by

bos

Hacker since 1985. Hacks electronics, Android, Python, Unix, shells.

Updated on June 05, 2022

Comments

  • bos
    bos about 2 years

    Sometimes I'd like to print my code and read it during lunch. In Eclipse I'm using 10pt Helvetica font, but printing at this size is a waste of paper I think. I changed to font size 6pt, and the print was perfect; fully readable and paper saving.

    However, coding in 6pt font is very hard and stressing for my eyes, so I cannot keep the setting. Also, changing font size everytime I print is a pain.

    Is there a way to keep 10pt for my editor AND have the printer run at 6pt, at the same time?

    • Scorpion
      Scorpion over 12 years
      how about doing it using priniting preferences?
    • bos
      bos over 12 years
      Do you mean the preferences under File->Print->Preferences? I can't find anything of relevance in there.
    • Returning to Coding
      Returning to Coding almost 11 years
      It doesn't appear that anyone has answered this question. Am I wrong? Is it possible to keep 10pt in editor and print 6pt font. I'm using Indigo 4.2 version for the Mac.Still doesn't appear possible.
    • trevorkavanaugh
      trevorkavanaugh about 10 years
      This question would be so useful if there was a legit answer :( Seems like we are stuck going back and forth between font sizes.
  • bos
    bos over 12 years
    Thanks for the answer, but that's not what I'm looking for. (See the last sentence of the second paragraph in my post)
  • hradac
    hradac over 12 years
    I am sorry I did not completely answer your question but this is the best solution I could come up with. I found quite a few bug reports to Eclipse about this very problem so I hope that gets fixed. Perhaps someone else has the solution?
  • matbrgz
    matbrgz over 11 years
    Is this not another issue, namely that there is a print scaling problem with GTK and not that the print font is the same as the screen font?
  • abarisone
    abarisone over 8 years
    Could you please elaborate more your answer adding a little more description about the solution you provide?
  • Stefan Bormann
    Stefan Bormann over 7 years
    What "command line" do you mean? If command line arguments when starting eclipse is meant, this does not work with Luna on windows.