[Gtk-sharp-list] Printing with Gnome on Win32

Daniel Morgan monodanmorg at yahoo.com
Mon Dec 19 18:48:27 EST 2005


Paco created an experimental combined Mono 1.11  and GTK# 2.4 win32 installer which includes gtk+ 2.8 and GNOME 2.12  binaries.  It includes libgnomeprint and libgnomeprintui too.
  
  http://forge.novell.com/modules/xfmod/project/?monowin32
  
  Note: there is an exe and 4 bin files you must download.  Novell  Forge does not allow files greater than 50 MB, so it had to be split  up.  The README has more info.
  
  The gnome-sharp.dll assembly includes support for GnomePrint#.
  
  I had to modify the etc/mono/config file:
  <configuration>
      <!--<dllmap dll="cygwin1.dll" target="libc.so.6" />
      <dllmap dll="libc" target="libc.so.6" />
      <dllmap dll="libintl" target="libc.so.6" />
      <dllmap dll="libxslt.dll" target="libxslt.so" />
      <dllmap dll="libmySQL.dll" target="libmysqlclient.so" />
      <dllmap dll="odbc32.dll" target="libodbc.so" />
      <dllmap dll="oci" target="clntsh" />
      <dllmap dll="db2cli" target="libdb2_36.so"/>
      <dllmap dll="msvcrt" target="libc.so.6"/>
      <dllmap dll="MonoPosixHelper" target="libMonoPosixHelper.so"/>
      <dllmap dll="sqlite" target="libsqlite.so.0"/>
      <dllmap dll="sqlite3" target="libsqlite3.so.0"/>
      <dllmap dll="libX11" target="libX11.so"/>
      <dllmap dll="libcairo-2.dll" target="libcairo.so.2"/>-->
      <dllmap dll="rsvg-2" target="librsvg-2-2.dll"/>
      <dllmap dll="gnomecanvas-2" target="libgnomecanvas-2-0.dll"/>
      <dllmap dll="gnomevfs-2" target="libgnomevfs-2-0.dll"/>
      <dllmap dll="gnomeprint-2-2" target="libgnomeprint-2-2-0.dll"/>
      <dllmap dll="gnomeprintui-2-2" target="libgnomeprintui-2-2-0.dll"/>
  </configuration>
  
  I had to comment a lot of lines, and I added gnomeprint and gnomeprintui.
  
  In a Mono 1.1.11 command prompt, cd to /samples/gtksharp-2.x/sample and type this to build the PrintSample.cs:
  
  mcs -pkg:gnome-sharp-2.0 PrintSample.cs
  
  And to run:
  
  mono PrintSample.exe
  
  LIke Ivan said, you may get a mirror image of what should have printed.   However, its a start.
  
  Thanks Ivan and Paco.
  

"Ivan, Wong Yat Cheung" <email at ivanwong.info> wrote:  Daniel Morgan wrote:
> You may need the unmanaged libraries for GnomePrint.  I'm not sure if 
> the windows installer includes them or not.  Do not use the ones from 
> Cygwin.  You might be able to get them from ftp.gtk.org 
As the author of the Win32/GDI module of libgnomeprint, I can say that 
libgnomeprint supports Win32 officially. However, it's still quite 
buggy. You can submit any bug report to bugzilla.g.o.

> I've heard that gnome print works on windows if you mess with it 
> enough.  However, the gnome print ui that includes the print dialog does 
> not.
Building libgnomeprint(ui) is not really difficult if you know how to 
build hello-world for gtk+/win32. Actually, libgnomeprintui is more 
solid than libgnomeprint on the Win32 platform as libgnomeprint still 
has a well known transformation bug ATM. You can download a copy of 
Gnumeric/Win32 from [1] (which is the major user of libgnomeprint and 
libgnomeprintui on Win32) and open a .xls file with charts and texts. 
The worst case is that you will get mirrored page/text. (You can also 
get the binaries of libgnomeprint in the package)

[1] http://www.gnome.org/projects/gnumeric/downloads.shtml

-- 
Ivan, Wong Yat Cheung  
GPG: 1024D/7775FDBB: CE88 DBE0 5AF3 D4AC 91F5  6C0E 2C84 B2AD 7775 FDBB



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20051219/43933955/attachment-0001.html


More information about the Gtk-sharp-list mailing list