Printing out hard copy of program

Does anybody know how to print out on a printer a hard copy of the program? I only get blank pages coming out of the printer. I see that somebody else has had this problem.
I have seen a professional about this who says that there is nothing wrong with my printer or computer because anything else prints out ok, photos etc. The professional claims that the Arduino IDE is to blame.
Does anybody know how to fix this so that I can get hard copy of my programs?

Have you verified your printer driver is correct in your operating system?

If the IDE is not printing to file or device, paste your code in a plain text editor (notepad or gedit) and print from that application.

Notepad++ can print Arduino programmes.

I use an external editor geany which prints without a problem. It will open the .ino file and color code it as well.

Which version of the IDE?

Do you have the printing extension installed?

that will only print out in black and white. hoping to get a color print out. I have notepad but perhaps I need notepad++ as suggested by Nick Pyner. Then external editor 'geany' suggested by gilshultz sounds really promising.

I have Notepad. Is Notepad++ an improved version. Will it print out in color?

Where can I find this external editor you call "geany". This is exactly what I am looking for. That is to print out in color characters as in the sketch.

  • Often use Notepad++

Why? If you want syntax highlighting, use the IDE.

Geany is a Linux application; it's usually pre-installed with the distro. Which operating system are you using?

You can always use your favourite search engine to search.

In IDE 1.x:

  1. Select your entire sketch.
  2. In the EDIT menu, select "Copy as HTML"
  3. In a plain ascii editor, Paste the copied HTML.
  4. Save as plain text file with .html extension.
  5. Open the new .html file with a web browser or other html-aware application.
  6. Use "print" from that application.

:frowning:

Modern operating systems/languages don't seem to have a programmer API to print "plain text", and colored text is out of the question. Sigh. Nor a capability to turn HTML directly into printed output in a reasonable manner. Nor a background application that auto-detects "printing" and formats it appropriately. (eg you can't open a command window and say "print foo.html" and expect anything useful to happen.)

In theory, there are some Java libraries to output PDF, which might have almost worked. But IDE 1.x is deprecated and not worth working on any more, and IDE 2.x is "different" (and might already have a "print extension" that does what we want.)

(which would be really hard, and probably a big security risk, in the general case, what with HTML now being essentially a full programming language, and always having had that "get additional stuff from this other web site" feature, but it would be nice if there was a clearly defined "printable subset.")

Open Source... here is their Download page... including Windows:

I am using Geany in Lilnux, but it is also available for Windoz and the MacOs. I have only used the Linux version. This link will help you get it, source if you want it. https://www.geany.org/ I switched a long time ago as I got tired of losing data when the IDE crashed (several versions of 1.x.x) It also allows me to load all of the library files each in an individual tab. ^e is my favorite shortcut, it will search every tab for whatever phrase you want.


Notepad++ has nothing to do with Notepad. I believe it is made specifically for whatever it is that writes Arduino files, which may not be exclusive to Arduino.

Thanks for putting me onto Notepad++ NIck. Works great for copying from a sketch to hardcopy output from a printer. At the same time getting the colors of the characters on the sketch onto the hardcopy. Had no help from Epson to achieve this nor from the so called experts at Harvey Norman and other so called professionals I consulted.
The guy at Harvey Norman was getting annoyed at me coming back to see him all the time to try to fix the issue. He was basically ignoring me and seeing all other customers first. Even though I had purchased a new printer from him.

Glad it worked. The vital thing here is that it was never a printer problem. I'm sure any printer will do, and this sort of thing is really outside the purview of a Harvey Norman salesman!

Thanks again Nick. I am sure any printer will do. Pity the purchasers can't get this info immediately on purchasing their printer. I had a lot of chasing to do before I arrived at your good advice.