Windows FB Printing Lib

User projects written in or related to FreeBASIC.
vdecampo
Posts: 2982
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Windows FB Printing Lib

Postby vdecampo » Sep 13, 2007 12:21

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

Postby Antoni » Sep 13, 2007 14:03

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

Postby lemon » Sep 13, 2007 15:43

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

Postby rexxitall » Sep 13, 2007 17:58

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:

Postby Hexadecimal Dude! » Sep 13, 2007 18:12

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

Postby vdecampo » Sep 13, 2007 18:51

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

Postby Antoni » Sep 13, 2007 21:09

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:

Postby notthecheatr » Sep 13, 2007 21:40

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

Postby Antoni » Sep 14, 2007 5:33

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

Postby MichaelW » Sep 14, 2007 6:33

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)

Postby ciw1973 » Sep 14, 2007 8:43

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: 2396
Joined: May 27, 2005 4:59
Contact:

Postby Dr_D » Sep 14, 2007 9:15

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:

Postby notthecheatr » Sep 14, 2007 15:10

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.

Return to “Projects”

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 5 guests