Feature request #2271

print composer large format A0

Added by Gerhard Spieles almost 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Low
Assignee:ersts -
Category:-
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12331

Description

Print composers behavior seems to have a memory lack when printing large format A0.
Only part of objects (p.e aerial photos) will be print.
If the the amount of data grow up (data intensive raster layers, qgis crash

a0printcomposer4.jpg - missing parts in large format prints A0 (160 KB) Gerhard Spieles, 2009-12-11 02:31 PM

091222_raster_patch.diff Magnifier - Patch to print large rasters in tiles (13.4 KB) Marco Hugentobler, 2009-12-22 07:34 AM

091223_qgis_raster.diff Magnifier - Improved patch. Also fetches the WMS layers in several parts (22.4 KB) Marco Hugentobler, 2009-12-23 03:53 AM

printa0partofvectorlayerismissing.jpg (90.5 KB) Gerhard Spieles, 2009-12-26 01:02 PM

print_a0_scale-1_2500.jpg (123 KB) Gerhard Spieles, 2010-01-06 11:20 AM

print_a0_scale-1_600.jpg (107 KB) Gerhard Spieles, 2010-01-06 11:20 AM

largeprintformat_a0_use_pdf_icon_in_composer.jpg (122 KB) Gerhard Spieles, 2010-01-08 10:48 AM

History

#1 Updated by Giovanni Manghi almost 11 years ago

Would you mind give a try to the composer in the developer version of qgis (you can install it trough the osgeo4w installer, is labelled "qgis-dev")? There were major updates in the composer since 1.3 and in the tests I made with a few aerial photos I'm not seeing the same problem. Please leave further feedback, thanks.

#2 Updated by Marco Hugentobler almost 11 years ago

This is a known problem. It is because rasterlayer keeps the whole image that is printed in virtual memory. In case of A0 and a high resolution, this can be too much (even without leak).

#3 Updated by Horst Düster almost 11 years ago

Maybe an other option could be to check the "Print as raster" option in the Composer General Tab. Some PS-Printers with limited memory have problems to plot complex PS-Files ( Orthofoto with transparent overlays etc..). With the "Print as Raster" optition your map will be rendered as an image before it is embedded into the PS-File.

#4 Updated by Giovanni Manghi almost 11 years ago

How big images are we speaking before the composer starts giving problems? I just printed in A0 a 7.5GB image and it worked fine (under linux, qgis trunk).

#5 Updated by Marco Hugentobler almost 11 years ago

Attached is a work-in-progress patch that draws rasters in tiles of appr. 200 MByte (this can be configured in QgRasterImageBuffer::reset()). It adds a new class QgsRasterImageBuffer that takes care of partitioning the image and the requests to retreive data from GDAL. So all the partitioning happens transparent to QgsRasterLayer.
In the patch, QgsRasterImageBuffer is only applied in the method QgsRasterLayer::drawPalettedSingleBandColor. But I'm going to change the other ones too once the raster team reviewed the patch (and thinks the approach is ok).

#6 Updated by Gerhard Spieles almost 11 years ago

Hello,
have installed version 1.4.0 6a4fbd78 (SVN r12620).
Printing a large format A0 with spatial images and reducing the print quality to 200dpi shows the complete spatial images. The documet produced with "Freepdf" printer has 35MB.
220dpi brings a pdf documet with 73MB.
At 250dpi, nearly 66% of the spatial image are lost.
At 300 dpi, the complete spatial images are missing.

In all produced pdf-documents, a part of a vector layer is also not printed.(It begins near 1/3 left of the right margin in the pdf-document.)
A screenshot is attached.

#7 Updated by Giovanni Manghi almost 11 years ago

Replying to [comment:8 gespiel]:

Hello,
have installed version 1.4.0 6a4fbd78 (SVN r12620).
Printing a large format A0 with spatial images and reducing the print quality to 200dpi shows the complete spatial images. The documet produced with "Freepdf" printer

Have you tested a different pdf printer? I cannot replicate your problems under linux as I regularly create 300dpi pdfs with a lot of heavy data.

#8 Updated by Gerhard Spieles almost 11 years ago

Replying to [comment:10 lutra]:

Replying to [comment:8 gespiel]:

Hello,
have installed version 1.4.0 6a4fbd78 (SVN r12620).
Printing a large format A0 with spatial images and reducing the print quality to 200dpi shows the complete spatial images. The documet produced with "Freepdf" printer

Have you tested a different pdf printer? I cannot replicate your problems under linux as I regularly create 300dpi pdfs with a lot of heavy data.

Hello,
I tried it with dopdf v7 also (this printer [email protected] use ghost script) with the same result.

#9 Updated by Giovanni Manghi almost 11 years ago

I just tested one of my big projects (a couple of hundred mb of vectors plus 3/4 gb of rasters) under windows xp sp3 and qgis 1.4. Printed a A0 at 300 dpi with the "primo pdf" driver produced a 50mb pdf file that shows perfectly the print layout.

#10 Updated by Gerhard Spieles almost 11 years ago

Hello,

have tested it again. It seems, that the problem depends what map scale is used.
Attached are jpg-images with the results of two A0 prints. The only difference is the choosen mapscale in the composers item, Map, Scale.
At scale of 1:2500, the complete spatial images are printed. At scale of 1:600, only a part oft the spatial images is printed.

#11 Updated by Giovanni Manghi almost 11 years ago

I still see no problems even at very high scales, at least with my data.

#12 Updated by Marco Hugentobler almost 11 years ago

Hi gespiel

Did you work with or without the patch applied?
If without patch: I think it is because current svn version keeps all the image data in virtual memory.

Also: instead of using the PDF printer, you could use the (platform independent) pdf export in composer. Maybe the results are better reprocable on other systems like that.

Marco

#13 Updated by Gerhard Spieles almost 11 years ago

Hi Marco,

have tested the pdf-print icon in the composer.
Using A0-Format, Qgis crashes. (see attached jpg)
I Use qgis 1.5.0-dev, rel. 12704 installed by OS4GeoW.
Does this release content your patch?
If not, how can I install the patch?

#14 Updated by Giovanni Manghi almost 11 years ago

Replying to [comment:16 gespiel]:

Hi Marco,

have tested the pdf-print icon in the composer.
Using A0-Format, Qgis crashes. (see attached jpg)
I Use qgis 1.5.0-dev, rel. 12704 installed by OS4GeoW.
Does this release content your patch?
If not, how can I install the patch?

It seems that in 6d4e233b (SVN r12810) changes have been made that can help solve your issues. In the next days (maybe already tomorrow) you should be able to install qgis-dev with osgeo4w including this code update. Please give it a try and leave feedback.

#15 Updated by Gerhard Spieles almost 11 years ago

Replying to [comment:17 lutra]:

Replying to [comment:16 gespiel]:

Hi Marco,

have tested the pdf-print icon in the composer.
Using A0-Format, Qgis crashes. (see attached jpg)
I Use qgis 1.5.0-dev, rel. 12704 installed by OS4GeoW.
Does this release content your patch?
If not, how can I install the patch?

It seems that in 6d4e233b (SVN r12810) changes have been made that can help solve your issues. In the next days (maybe already tomorrow) you should be able to install qgis-dev with osgeo4w including this code update. Please give it a try and leave feedback.

Hello,

have just installed r1281M and all is good. The pdf-print content the complete spatial images.
Thank you verry much!!

Gerhard

#16 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Also available in: Atom PDF