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



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 when the printing real happening, character to character.

Me have a visual printer, but this verification is not possible, because I am a blind person.

With Braille printers insensitive the visual lookup the input text, only important when the draw_page function sends the printed output to the user selected Braille printer, the already generated text formattings is not lost during page drawing (space characters doed indentations, blank lines when more blank lines have a page, etc).

In the begin-print signal possible calculating how many Braille pages fit the document, simple need divmod the document line numbers with lines/page property.

For example, if a document have 29 braille lines, and lines/page property is 28 lines, need generating two pages in the begin-print signal function the operation.set_n_pages(2) function call.
Me this calculation always estimated right the braille pages count.

Possible in the draving operation need moving the pen the next line if have a blank line? If the text more blank lines, possible doing more move operations only to move the real paper with the correct position when the printing happening a real hardware?

When page draving is happening, Not possible need processing the page layout content with layoutLine to layoutLine object, and if the layoutLine object text is blank, need moving the pen the next line left margin position to resulting a real blank line before the next paragraph? Left, top, bottom and right margin positions possible querying the print_context.get_page_setup() sub functions.

I begin thinking with Pango Layout or CairoContext.show_layout function insensitive the \n\n\n\n formatting style text.

When you need drawing a blank line a page, what need you doing the draw_page signal?

I not full understanding the line and character positions calculations when I need give exactly a line number and a column position coordinates.

Attila


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]