emacs-devel
[Top][All Lists]
Advanced

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

Re: w32 issues


From: dhruva
Subject: Re: w32 issues
Date: Wed, 23 Jan 2008 08:43:39 +0530

Hi,

On Jan 23, 2008 7:59 AM, Lennart Borgman (gmail)
<address@hidden> wrote:
> > If Dhuvra finishes his helper application, we could configure that as
> > the default print application, since it will give the ability to print
> > on USB and non-SMB networked printers as well as any printers that do
> > not accept plain text over the wire.
>
> I thought dhruva wanted to add printing to Emacs itself (using the GDI
> API:s).

Well, my initial idea was to add something directly into the emacs
code. I have just got raw text printing working. I am working on
handling some basic formatting like page breaks.

The approach I am taking is as follows:
1. Read the buffer as a string
2. Break it into a list of lines and feed line by line to the printer
spool (printing will start only after a call to EndPage is made, hence
not a performance issue)
3. If I find a form feed (I guess CTRL-L), I will make a call to
EndPage and start a new page (treat it as a page break)
4. Continue the #2 and #3 till I reach the end of the buffer string


The current code (I am working on it only in spare time => slow progress)
1. I am writing it as a stand alone tool that I can integrate into
emacs at a later point
2. Reads a file (pipe the data)
3. Launches the printer selection option (and page setup) dialog
4. Send the data with no preprocessing to the printer
5. Not honoring the margin information the user selects in the page setup

I am able to get a printout though not well formatted. I need to
handle lines by setting the x/y coord in the TextOut call. I am
working of getting the pixel offset for new lines and need some
further exploration from my side. I am referring to the famous book by
Rector (Win32 Programming) and it has all the sample code to get it
done, I am fairly confident of puling it off.

-dky


-- 
Contents reflect my personal views only!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]