On Fri, Nov 4, 2011 at 12:48 AM, Paul A Norman <span dir="ltr"><<a href="mailto:paul.a.norman@gmail.com">paul.a.norman@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

A "
<span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px">given rectangle</span> " would be an enormous bonus (thought that would be some time off), but a straight page dump would be more than adequate even as a first step.<div>


<br></div><div>Thinking of just whole page, perhaps rendered to QImage (in  memory?) as the target, looks like it can work out format for save on file dialogue requested extension if no format is specified.</div><div><br>


</div><div><div class="im"><table style="background-color:rgb(230, 231, 232);border-top-left-radius:7px;border-top-right-radius:7px;border-bottom-right-radius:7px;border-bottom-left-radius:7px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(230, 230, 230);border-right-color:rgb(230, 230, 230);border-bottom-color:rgb(230, 230, 230);border-left-color:rgb(230, 230, 230);font-size:11px;margin-bottom:15px;margin-top:15px;margin-right:15px;margin-left:15px;color:rgb(54, 53, 52);font-family:Verdana">


<tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif;padding-top:3px;padding-right:5px;padding-bottom:3px;padding-left:10px;text-align:right;vertical-align:top">


Bool</td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif;padding-top:3px;padding-right:15px;padding-bottom:3px;padding-left:0px"><b><a href="http://doc.qt.nokia.com/latest/qimage.html#save" style="color:rgb(76, 0, 51);text-decoration:none" target="_blank">save</a></b> ( const QString & <i>fileName</i>, const char * <i>format</i> = 0, int <i>quality</i> = -1 ) const</td>


</tr></tbody></table></div><div><span style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)">"If </span><i style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)">format</i><span style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)"> is 0, </span><a href="http://doc.qt.nokia.com/latest/qimage.html" style="color:rgb(76, 0, 51);text-decoration:none;font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)" target="_blank">QImage</a><span style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)"> will attempt to guess the format by looking at </span><i style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)">fileName</i><span style="color:rgb(54, 53, 52);font-family:Verdana;font-size:13px;line-height:20px;background-color:rgb(230, 231, 232)">'s suffix.</span> "<br>


<br>Makes it all a bit more painless perhaps?<span class="HOEnZb"><font color="#888888"><br><br>Paul</font></span></div></div></blockquote><div><br></div><div>Pages are no longer rendered as a single image---they are split into a set of tiles (each a separate image) for efficiency. A US letter-sized page spans 2 tiles at 100% magnification. `render` may be the easiest method because it triggers the code required to gather the required tiles and fuse them into a single image.</div>

<div><br></div><div>Saving a whole page, or user-defined subsections would be pretty easy to do but both tasks would require writing additional code. At this point I am inclined to hold off on writing new code to focus on debugging and polishing the code that is already written so that it can be merged back into the TeXworks trunk.</div>

<div><br></div><div>-Charlie</div></div>