I am using leafpad text editor on Debian (version

When I print text from leafpad, the document name and the page numbers are automatically printed on the page.

i am not sure if these settings come from leafpad itself, or from some system print settings (I am using LXDE desktop environment).

Is it possible to hide document name and the page numbers on the printed page?

I would be happy to recompile leafpad from source, if somebody could point me to the section in source code that needs to be modified.


The source code has this builtin. You can see the code in file src/gtkprint.c in the function cb_draw_page():

pango_layout_set_text(layout_lh, page_title, -1);
pango_cairo_show_layout(cr, layout_lh);
page_text = g_strdup_printf("%d / %d", page_nr + 1, n_pages);
layout_rh = gtk_print_context_create_pango_layout(ctx);
pango_cairo_show_layout(cr, layout_rh);

Comment out at least the two pango_cairo_show_layout() calls shown here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.