PDA

View Full Version : QGraphicsScene print ? or to pdf format?



patrik08
15th July 2007, 16:05
I have nearly ended with my converter xsl-fo -> QTextDocument, ( without java fop)
but my BIG problem how I can print the scene? all item on position absolute on A4.
I must re-unite all single piece to on QTextDocument? ( and lost top/left width..)

Or how print all to pdf? as image the full QGraphicsScene?




<fo:block-container border-color="black" border-style="solid" border-width="1pt" height="1cm" width="14cm" top="11cm" left="4cm" padding="2pt" position="absolute">
<fo:block text-align="start" space-after.optimum="3pt" line-height="15pt" font-family="sans-serif" font-size="12pt"> Please remit to the above address </fo:block>
</fo:block-container>

wysota
15th July 2007, 23:31
How about using QGraphicsScene::render()?

patrik08
15th July 2007, 23:52
How about using QGraphicsScene::render()?

the render is like image? and can handle printer.setOutputFormat(QPrinter::PdfFormat); ?

wysota
16th July 2007, 00:37
The render is not "like image". It just outputs to a paint device and a printer is a paint device.