Re: No tk_chooseFont or tk_choosePrinter?

From: Jiang Wu (jwu_at_xenon.Stanford.EDU)
Date: 08/18/04


Date: Wed, 18 Aug 2004 21:09:49 +0000 (UTC)

In article <H5-dnTtMe7h7IL7cRVn-rw@comcast.com>,
USCode <uscode@dontspam.me> wrote:
>Not an option. I have no idea how many people will want to download my
>applicationa and I don't want to require my Windows users to install
>GhostScript just for my application to be able to print. The goal is to
>just copy the executable and other assorted files and go! Thanks for the
>suggestion anyways.

To solve the printing issue for Windows, I adapted the GDI and Printer
extensions from:

    http://www.du.edu/~mschwart/tclextensions.html

to print formatted text with different font, paging, and line wrapping.
It wasn't easy. I had to do much of the work in C functions so
that I can use Tk's internal text drawing routines to handle fonts and
line wrapping. To leverage the Tk's internal text drawing routines
for printing, I also had to access some non-public Tk structs.

I haven't dealt with printing graphics yet. But will probably do that
later as well.

-- Jiang Wu
   jwu@cs.stanford.edu

>
>



Relevant Pages

  • Re: VB Printer Dialog Problem (VB6)
    ... What I would really like to know is exactly what it is you are printing? ... Forms and printers have very different resolutions (typically 96 pixels per inch in the case of a Form and 600 pixels per inch in the case of a printer). ... Font sizes can only be in "whole pixel values", so when you ask for an 11 point font on a specific device the operating system will examine the "pixels per inch" of that device and will give you the nearest font size it can, to the nearest whole pixel value. ... If you are using a RichTextBox then it is very easy to do that. ...
    (comp.lang.basic.visual.misc)
  • Re: Site critique requested (mostly accessibility issues, but anything else welcome)
    ... serif font. ... , and for printing. ... The reader then has the choice of not printing the ... Culpeper is largely maintained by volunteers ...
    (uk.net.web.authoring)
  • Puzzles with printed output
    ... I'm working with printing from a subclass of JTextPane. ... but I had similar problems with Swing's built-in Serif font. ... same as in printed output from Word), but it appears to be bold, although I ... Line spacing on the screen is the same as in Word (with Word's line spacing ...
    (comp.lang.java.gui)
  • Re: Data Report: Do it the hard way :-)
    ... I've never seen that code before so I don't yet know for certain exactly how it works but I've just downloaded it now for a quick look and it seems to be using the more or less standard simple print preview technique of passing a DC to a main printing routine and using more or less the same code to set up the font and graphic settings of the DC and then sending text and images to it. ... You can see the effects of this problem straight away if you download the code from the link you posted and run the PrintPreviewDemo_BMP example and click the Print Preview Instructions button and perform both a Preview and a Print to the printer. ...
    (microsoft.public.vb.general.discussion)
  • RE: I CANNOT PRINT ANY NEWLY CREATED WOR/ EXCEL DOCS, BLANKS COMIN
    ... I have just realised my printing Word problem, ... created two wks I chose navy as the font colour, and I have just changed my ... I still think its weird that my black emails and BBC weather web page has ... I DID EMAIL MY NEW LETTERS TO A MATE AND SHE COULD PRINT OFF MY NEW WORD ...
    (microsoft.public.word.docmanagement)

Loading