[Qt-interest] SVG Questions

Dan White ygor at comcast.net
Sun Feb 22 05:16:23 CET 2009


I am trying to do some simple line drawings with text and have it  
output to either PDF or SVG.

I have managed the PDF with very pleasing results, but the SVG is  
driving me buggy.

I have been unable to get the page size of the SVG document or get my  
drawing to scale into the page properly.  I get a drawing that looks  
like what I want, but is about 25 times bigger than what I want.  I  
get a document page that is about 20 times bigger than what I want,  
and does not have the same height to width ratio as the drawing.    
All my text has a font size of -2 and displays rotated 180 degrees  
and very very tiny.

With the PDF, I can just call

printer->setOutputFormat ( QPrinter::PdfFormat ) ;
and then
printer->setPaperSize ( ... ) ;

I tried using QSvgGenerator->setSize() in a similar fashion, but it  
does not give me the results I want.

Can anyone point me in the correct direction ?



More information about the Qt-interest-old mailing list