[PB-Linux] Printing with 3.94 & Demo-App

Developed or developing a new product in PureBasic? Tell the world about it.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

[PB-Linux] Printing with 3.94 & Demo-App

Post by walker »

Hi,

ever wanted to print on Linux with PB?
Here is a solution until 4.00 is ready (hope, there will be printer support)... Anyway

I've written a small text-app (nothing special) just to show, how to print on Linux.

The demo-application:
Image
(you can load/save textfiles, cut/copy/paste but no undo yet)

The printing dialog:
Image
Files to print MUST be previous saved (for the moment you can't print unsaved text); settings are NOT saved yet

There are a few things to do before you can start.
Install (if not already) the packages evince (for preview) and enscript (for textoutput) using your favorite package manager

Download this: http://home.arcor.de/x-linux/pure/TeEDx_source.tar.gz
(which contains the source and a precompiled exe)
or this:
http://home.arcor.de/x-linux/pure/TeEDx
(which is the executable only)

And finally here is an includefile for your own projects:
http://home.arcor.de/x-linux/pure/printing.pbi

Include this in your project, do a

Code: Select all

gtk_init_(0,0)
before this include; thats all
To call the printing dialog simply do a

Code: Select all

pd=create_window_print()
gtk_widgets_show_all_(pd)
May you have to include the missing_functions.pb too which are found in the tar.gz or here:
http://home.arcor.de/x-linux/pure/missing_functions.pb

It's a simple version for now (even without language support) so I appologize for the labels in german... translation follows

Btw.: the application and the dialogs are created with Glade2PB.. :wink:

The source is free for everyone. Feel free to modify and use in your own projects (may you mention me in the credits.. but this isn't a must)

Feedback, questions and comments are appreciated...
Last edited by walker on Wed Jun 21, 2006 12:07 am, edited 2 times in total.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Hey very cool man! I might actually be needing this soon.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Gonna try this and the new Glade2PB tomorrow. Thanks!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, the printer management is already done for PB4 Linux.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

Nice to hear.... and if you may need help on testing... :D

Btw. Which GTK-version do you use while developing v4.0?
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Fred wrote:Yes, the printer management is already done for PB4 Linux.
yeah, a little screenshot ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

:shock:

Image

:lol:
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

very thank you walker, nice to you. :D

but, humm, i was speaking about the PrintRequester under linux...
what does it looks like ? :roll:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

sorry.. couldn't resist.. :wink:

maybe it looks like this:

http://groups.osdl.org/apps/group_publi ... it-gtk.pdf
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

yes i guessed you couldn't resist, funny guy :)
about gtk printer dialog, it looks very good indeed.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

Yes, and I hope, this will be near to the requester we'll get... (as this is the GTK-build-in requester... )

@Fred: any hint?
Post Reply