Hi,<div><br></div><div>You still need to call StartDoc/StartPage/EndPage/EndDoc in the right places. The printing surface (as opposed to the &quot;normal&quot; win32 surface) merely outputs high-quality GDI-based vector drawing commands as much as possible. Interacting with the printer is still the caller&#39;s responsibility.</div>
<div><br></div><div>Best,</div><div>Dom<br><br><div class="gmail_quote">On Thu, Sep 17, 2009 at 5:02 AM,  <span dir="ltr">&lt;<a href="mailto:dostojew@freenet.de">dostojew@freenet.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><p style="margin:0px;padding:0px">Hello,</p>
<p style="margin:0px;padding:0px"> </p>
<p style="margin:0px;padding:0px">I want to use the
cairo_win32_printing_surface to get printing working under
windows. I don&#39;t get any error message, although
cairo_status is success, but the printer is doing
nothing.</p>
<p style="margin:0px;padding:0px">I tried the following
code:</p>
<p style="margin:0px;padding:0px"> </p>
<p style="margin:0px;padding:0px">#include
&lt;cairo-win32.h&gt;<br><br>int main(int argc, char
*argv[])<br>{<br>  HDC hDC;<br>  cairo_t
*cr;<br>  cairo_surface_t *surface;<br>  <br>  hDC = CreateDC (&quot;WINSPOOL&quot;, &quot;EDV&quot;, NULL, NULL);<br>  surface = cairo_win32_printing_surface_create
(hDC);<br>  cr = cairo_create (surface);<br><br>  cairo_select_font_face (cr, &quot;Sans&quot;,
CAIRO_FONT_SLANT_NORMAL,<br>                              
CAIRO_FONT_WEIGHT_BOLD);<br>  cairo_set_font_size
(cr, 12.0);<br><br>  cairo_move_to (cr, 10.0,
135.0);<br>  cairo_show_text (cr, &quot;Hello&quot;);  <br>  cairo_show_page (cr);<br><br>  printf
(&quot;%s\n&quot;,  cairo_status_to_string (cairo_surface_status
(surface)));<br>  cairo_surface_destroy (surface);<br>  cairo_destroy (cr);<br>  <br> 
DeleteDC(hDC);<br><br>  return 0;<br>}</p>
<p style="margin:0px;padding:0px"> </p>
<p style="margin:0px;padding:0px">Is there simply
something missing or am I doing something wrong?</p>
<p style="margin:0px;padding:0px">I use Cairo-1.8.8-2 on
windows-XP-system whith Dev-c++ and Mingw</p>
<p style="margin:0px;padding:0px">The Device-Context I get
from CreateDC is ok, because when I use StartDoc the Printer
begins to print.</p>
<p style="margin:0px;padding:0px"> </p>
<p style="margin:0px;padding:0px">Has anyone an idea?</p>
<p style="margin:0px;padding:0px">Thank&#39;s for your
help</p>
<p style="margin:0px;padding:0px"> </p>
<p style="margin:0px;padding:0px"> </p></div>


<br>--<br> 
<a href="http://adserver.freenet.de/click.ng/site=fn&amp;affiliate=fn_mail&amp;prod=fn_mail&amp;tbl=webmail&amp;ppos=14&amp;rgtg=256&amp;TransactionID=1253178130169236" target="_blank"><img border="0"></a>
</div>
<br>_______________________________________________<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br><br clear="all"><br>-- <br>&quot;I like to pay taxes. With them, I buy civilization.&quot; --  Oliver Wendell Holmes<br>

</div>