GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Dec 20, 2014 5:52 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Printing with GTK
PostPosted: Mon Apr 09, 2007 10:16 am 
Offline

Joined: Tue Mar 27, 2007 6:47 pm
Posts: 2
Hi!

I've just started to use GTK for windows programming and I'm quite new at programming. But even though I want to know how to print documents.

Is there any special way in GTK to send documents to printer? Can I print what's in a GtkTextBuffer? Or can I make a PostScript file out of it? GtkPrintJob, gtk_print_job_set_source_file() - can I use this function to print PS-files, system wide? What is the easiest way to create a PS-file in C programming? I want to print documents with both images and text.

Does anyone know any tutorial for this? Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 09, 2007 11:15 am 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
To print, you have to create a Cairo context, so basically, you cannot "just print a GtkTextBuffer." You must explicitly format the whole document, page by page. There are no tutorials available right now since printing has just been added to GTK+, but it is covered in my book (http://www.gtkbook.com).

If you would rather just look at code, check out the test application in the GTK+ source, although that contains absolutely no description of what is going on.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group