Windows FB Printing Lib

General FreeBASIC programming questions.
Post Reply
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Windows FB Printing Lib

Post by vdecampo »

Is there a need for this? If so, I would like to give a crack at it.

What would you like to see in a printing lib?
Easily select target printer
printing and drawing commands
Easy to access printer object and properties

What else?

-Vince
Last edited by vdecampo on Sep 13, 2007 21:51, edited 1 time in total.
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

I suggest:
-Print a GFXLib screen
-Print a bsaved image
-Print a text with a selected font, in a selected area of the paper
-Print plain text in a selected font
-color,font, spacing, size, margin adjustments
-Headers and footers
-Line drawing for margins, boxes

Is it enough? :)
lemon
Posts: 4
Joined: Sep 11, 2007 3:19

Post by lemon »

in a printing library:

- what you need to print x to printer y without error z ever happening, assuming any human interaction w is carried out before printing occurs.

------

..clear enough
rexxitall
Posts: 10
Joined: Sep 13, 2007 16:40
Location: germany
Contact:

Re: Definitive FB Printing Lib

Post by rexxitall »

a easy way to generate html and PDF documents ;)
maybee look at htmldoc and others
i often write html and then let the result convert to pdf

have fun Thomas
Hexadecimal Dude!
Posts: 360
Joined: Jun 07, 2005 20:59
Location: england, somewhere around the middle
Contact:

Post by Hexadecimal Dude! »

cross platform, (at least windows + linux). Enough control so that your program can specify how the printed page should look accurately.
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

Hexadecimal Dude! wrote:cross platform, (at least windows + linux). Enough control so that your program can specify how the printed page should look accurately.
Well since this will be using the Windows API, making it cross compile will be difficult to say the least. I will concentrate on Windows and leave Linux compatibility to someone else.
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

This RTF printer may be a good addition to the library.

http://www.network54.com/Forum/183705/m ... +FreeBasic.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

You could try using wx or something else, perhaps... I think cross-platform is essential if you want to make a definitive, "official" library for FreeBasic. If you must use the windows API, try to use it minimally - create an interface module that interfaces the windows API directly, and have the rest of the library use cross-platform resources only. That way, it will be easier to port to other platforms.
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

FB is usint the standard libs everywhere, I'm against of using wx or something like this.
Printing is 90% about calling the API, at least in windows (how do yo do formatted printing in Linux? Postcript?), so no way of separating the OS-dependant functions in a module...
I guess a portable library will be two libs in a wrapper.
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Post by MichaelW »

I also think wx should be avoided.

Provide a way to control scaling, not just to control the size of the printed image, but also to maintain the aspect ration between the screen and the printer.
ciw1973
Posts: 157
Joined: Jun 12, 2007 15:03
Location: Isle of Man (United Kingdom)

Post by ciw1973 »

I've had very good results using PDFLib. It's very easy to use and I'm sure it'll do what you need.
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Post by Dr_D »

I think it would be useful. Especially all those things Antonio mentioned.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

Come to think of it, I also think using wx would probably be a bad idea - it was just a suggestion.

Probably the best thing to do is have a standard interface for applications, then a separate module with the system calls. Unfortunately, like Antoni said, it probably will be 90% API calls, so I don't know... I guess if you want to make a Windows-only library that's fine, just don't call it fbprint or the like if it's not going to be cross-platform. Perhaps other users will be able to write libraries for other platforms with the same interface, then perhaps it could become the official fbprint library.
Post Reply