qt - Can we save png file using QPrinter? -


using same example in

how convert pdf file png (image) file in qt

is there way can use qpainter save png file. please see example below

qstring filepath("x.pdf"); qprinter printer(qprinter::highresolution); printer.setcreator(product_name); printer.setoutputfilename(filepath; printer.setoutputformat(qprinter::nativeformat); qpainter painter(&printer); render(&painter); 

i tried above code not working in case.the image not proper.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -