|
From: | Gubinelli Massimiliano |
Subject: | Re: [Texmacs-dev] Printer widget questions and implementation proposal |
Date: | Thu, 11 Nov 2010 16:46:03 +0100 |
Hi, On 11 nov. 2010, at 14:33, Miguel de Benito Delgado wrote: Hi, this is part of my first attempt to implement a qt print dialog, we will drop it when we will have a working implementation of the print dialog. With Joris we have discussed the problem and he decided that, at least for the moment, the printing API should be based on the printer_widget function as defined in widget.hpp. That is: Qt receives a pdf or ps representation of the document to print and can use it at will: change pagination, scaling, take a subset, etc.... before sending to the printer. This strategy it is not perfect but is reasonably simple to implement and need minor changes in the texmacs code. On mac for example we can also provide a preview. On the other platform we can provide a preview using ghostscript if available (to convert the ps to images) or Poppler if we decide to support it as a TeXmacs/Qt plugin.
The printing problem is quite subtle and I do not see how passing a renderer can provide an alternative api. Could you explain me better you rationale for the alternative api? At the moment the only renderer which produces output which is suitable for printing is the postscript renderer. I'm working on a pdf renderer but it is not ready. The qt renderer is not good for printing since it draw glyphs as bitmaps while we want to send glyphs as native ps fonts to retain the best quality for the printer resolution. To finalize this goal you will need to implement the printer_widget function and then we have to modify the texmacs side to provide an access point to this function (for example call it in the edit_main_rep::print_buffer function). best max
|
[Prev in Thread] | Current Thread | [Next in Thread] |