Opened 14 years ago

Closed 14 years ago

#2271 closed patch (fixed)

print composer large format A0

Reported by: gespiel Owned by: ersts
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: Printing Version: 1.3.0
Keywords: Cc:
Must Fix for Release: Yes Platform: Windows
Platform Version: XP sp3 Awaiting user input: no

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

Attachments (7)

a0printcomposer4.jpg (159.8 KB ) - added by gespiel 14 years ago.
missing parts in large format prints A0
091222_raster_patch.diff (13.4 KB ) - added by mhugent 14 years ago.
Patch to print large rasters in tiles
091223_qgis_raster.diff (22.4 KB ) - added by mhugent 14 years ago.
Improved patch. Also fetches the WMS layers in several parts
printa0partofvectorlayerismissing.jpg (90.5 KB ) - added by gespiel 14 years ago.
print_a0_scale-1_2500.jpg (123.0 KB ) - added by gespiel 14 years ago.
print_a0_scale-1_600.jpg (106.5 KB ) - added by gespiel 14 years ago.
largeprintformat_a0_use_pdf_icon_in_composer.jpg (122.3 KB ) - added by gespiel 14 years ago.

Download all attachments as: .zip

Change History (26)

by gespiel, 14 years ago

Attachment: a0printcomposer4.jpg added

missing parts in large format prints A0

comment:1 by lutra, 14 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.

comment:2 by mhugent, 14 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).

comment:3 by hdus, 14 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.

comment:4 by lutra, 14 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).

by mhugent, 14 years ago

Attachment: 091222_raster_patch.diff added

Patch to print large rasters in tiles

comment:5 by mhugent, 14 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).

comment:6 by mhugent, 14 years ago

Type: bugpatch

comment:7 by mhugent, 14 years ago

Owner: changed from nobody to ersts

by mhugent, 14 years ago

Attachment: 091223_qgis_raster.diff added

Improved patch. Also fetches the WMS layers in several parts

comment:8 by gespiel, 14 years ago

Hello, have installed version 1.4.0 r12619. 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.

comment:9 by pcav, 14 years ago

Milestone: Version 1.4.0

in reply to:  8 ; comment:10 by lutra, 14 years ago

Replying to gespiel:

Hello, have installed version 1.4.0 r12619. 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.

in reply to:  10 comment:11 by gespiel, 14 years ago

Replying to lutra:

Replying to gespiel:

Hello, have installed version 1.4.0 r12619. 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 don`t use ghost script) with the same result.

comment:12 by lutra, 14 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.

by gespiel, 14 years ago

Attachment: print_a0_scale-1_2500.jpg added

by gespiel, 14 years ago

Attachment: print_a0_scale-1_600.jpg added

comment:13 by gespiel, 14 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.

comment:14 by lutra, 14 years ago

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

comment:15 by mhugent, 14 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

comment:16 by gespiel, 14 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?

in reply to:  16 ; comment:17 by lutra, 14 years ago

Replying to 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 r12809 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.

in reply to:  17 comment:18 by gespiel, 14 years ago

Replying to lutra:

Replying to 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 r12809 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

comment:19 by lutra, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.