How to print a listing with correct layout?

I use the arduino IDE 1.5.2.

I need a printout with the same colours and indents as in my program. When I copy all the lines to MS-WORD, all text is in black&withe and indents are smaller than the original. Printing to a PDF (with PDF-creator) delivers an empty document.

How can I get a right printout? :roll_eyes:

IN the Arduino IDE click File then click Print.

The font is enormous! The lines willl be shortened! How to adjust the font?

File/Preferences/Editor font size in the IDE perhaps

Switch to Eclipse or Atmel Studio 6 :slight_smile:
full color listings

Fontsize 8 works quite well, you can use e.g. the free cutePDF writer for this kind of experiments, (and a lot more)

Alternative is copying it to notepad++ It has good syntax highlighting and print it from there (use cutePDF to veryfiy :wink:
At least the listing gets a header (filename - date/time) and page number in the footer.

see attachment (its a test application for my print.cpp mod)

new 3.pdf (21.5 KB)

Have you tried Copy to Forum, or Copy to HTML?

Sublime Text 2, great program, strongly advise using it.

While I do not condone the following method in any possible way other than for some laughs (even thought it would totally work).

1) PrtScn and take a Screenshot of your code 2) Paste screenshot in paint. 3) Proceed to edit out edges and unwanted filth surrounding your code. 4) Print the beautiful picture of your code :)