Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-16 Thread Eric Cashon via gtk-app-devel-list
Hi Attila, The text buffer does return the correct number of chars with spaces. If I get a char count on the lines with or without numbers it returns the correct number. When I export to PDF the layout is the same as the print preview. When I test with pdftotext then, as you say, it doesn't

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-15 Thread Hammer Attila
Hi Eric, This test code me works correctly too if keeping the line numbers each blank lines. If have a number before a simple \n line, the correct line positioning happening when I trying convert back the generated pdf file with pdftotext -layout command. The last line of the first page right

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-15 Thread Eric Cashon via gtk-app-devel-list
OK, you got me on the PDF. I don't know about that. I think a monospace font will help though because they are easier to keep track of rows and columns since all the characters are in the same sized rectangle. The Marburg font is also in a constant sized rectangle. I don't know how to put

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-15 Thread Hammer Attila
Hi, I think the last post described exactly what the problem. I using the pdftotext test only because me not have a Braille printer hardware, and any way need verifying the real printed output with equals exactly the LiblouisUTDML file2brl command generated formatted text braille output file

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-15 Thread Yuri Khan
On Sun, Oct 15, 2017 at 1:42 AM, Eric Cashon via gtk-app-devel-list wrote: > The first thing that I would try out is to change the font that is being > drawn to see if that works. I am getting an impression that fonts are not going to make any difference. The OP

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-14 Thread Eric Cashon via gtk-app-devel-list
Here is something else that might help. Try a monospace font to test with. If you use a monospace font then your spacing should be kept correct. If I draw a grid around the characters, monospace will hold the spacing to the 28x32 grid. Eric ... new_font = Pango.FontDescription("Monospace

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-14 Thread Eric Cashon via gtk-app-devel-list
Hi Attila, I don't know the internals of how Pango deals with the different fonts for putting them on a layout. I have bumped into utf8_casefold() and utf8_normalize() before so I know fonts can get complicated. Maybe someone with more knowledge than I have about this can help. The first

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-14 Thread Hammer Attila
Hi, I forgot to attach Marburg medium standard specification link: http://webcache.googleusercontent.com/search?q=cache:g7kWlTjQ24YJ:https://www.pharmabraille.com/pharmaceutical-braille/marburg-medium-font-standard/%2Bmarburg%2Bmedium%2Bstandard=ubuntu=ZxJ=fs=0=hu=clnk Attila

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-14 Thread Hammer Attila
Hi Eric, Unfortunatelly I only possible testing the printed PDF output with pdftotext command and Orca screen reader, because I entire not seeing the screen. I looked the test program generated pdf output. When I converted the test file with pdftotext test.pdf -layout command, the .txt file

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-13 Thread Eric Cashon via gtk-app-devel-list
Hi Attila, You have a print dialog and click on "Print to File" to save the contents to a PDF file and that file is not being formatted correctly and isn't the same as what is in the print preview? I tried a small test program. It prints well to PDF with the extra lines. Does this program

Re: GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-13 Thread Hammer Attila
Hi List, Sorry, but unfortunatelly duplicated sent my letter. When first time sent my letter, longer time later I not seeing my post this list. Attila ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-13 Thread Hammer Attila
Dear list, Possible you have an ydea with following problem: I have a little Python3 code part with uses GtkSource.View and GtkSource.PrintCompositor to print native text file content with Gtk.Printoperation class. The example code is following: #!/usr/bin/env python3 import gi

GtkSource.PrintCompositor: How to possible printing plain text documents without lost blank lines and indentations?

2017-10-13 Thread Hammer Attila
Dear list, Possible you have an ydea with following problem: I have a little Python3 code part with uses GtkSource.View and GtkSource.PrintCompositor to print native text file content with Gtk.Printoperation class. The example code is following: #!/usr/bin/env python3 import gi