[texworks] Wishlist for pdf previewer
Paul A Norman
paul.a.norman at gmail.com
Fri Nov 4 08:48:34 CET 2011
A " given rectangle " 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.
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.
Bool*save <http://doc.qt.nokia.com/latest/qimage.html#save>* ( const
QString & *fileName*, const char * *format* = 0, int *quality* = -1 ) const
"If *format* is 0, QImage <http://doc.qt.nokia.com/latest/qimage.html> will
attempt to guess the format by looking at *fileName*'s suffix. "
Makes it all a bit more painless perhaps?
On 4 November 2011 19:26, Charlie Sharpsteen <chuck at sharpsteen.net> wrote:
> On Thu, Nov 3, 2011 at 11:11 PM, Paul A Norman <paul.a.norman at gmail.com>wrote:
>> >The best time to work on this would probably be alongside text selection
>> and copy/paste.
>> As in ...?
>> Bool*save <http://doc.qt.nokia.com/latest/qimage.html#save>* ( const
>> QString & *fileName*, const char * *format* = 0, int *quality* = -1 )
> You would want to use methods from QGraphicsView or QGraphicsScene to
> render a given rectangle using a painter that is targetting a QImage:
> void*render <http://doc.qt.nokia.com/4.7/qgraphicsview.html#render>* (
> QPainter * *painter*, const QRectF & *target* = QRectF(), const QRect & *
> source* = QRect(), Qt::AspectRatioMode *aspectRatioMode* =
> Qt::KeepAspectRatio )
> Then the image could be passed to the clipboard.
> Thanks -bit question not relevant for now then - relates to the pixel
>> depth format that the "image" as it were is being rendered at when returned
>> by pdf renderer.
> Ahh... those decisions are still out of our hands. The bit depth of the
> images is controlled by the rendering library---which is still Poppler at
> the moment but could change to MuPDF in the distant future.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the texworks