CAIRO PDF fails without error when symbol size is 0 #4654

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@DoofyMcDoofus

I have C# MapScript code running under IIS7 64bit which allows users to print a map as a PNG or PDF. My code configures a mapfile based on client permissions and then sets the appropriate OUTPUTFORMAT option.

Below are the resulting PNG and PDF - the only difference in the mapfile is the OUTPUTFORMAT:

usermapfile_20130514145449_print

capture

One of the layers was incorrectly configured with a symbol size of 0 as seen in this mapfile snippet:

capture2

When the offending style section is removed from the mapfile, the PDF exactly matches the PNG image:

capture3

I am concerned that the CAIRO pdf library simply returns the incomplete PDF image rather than throwing an error. Is it possible for the CAIRO library to throw an error in this instance so that I can catch it from within my C# code?

@tbonfort
Member

which mapserver version?

@DoofyMcDoofus

6.2.1 - I downloaded the latest C# version from Tamas (http://www.gisinternals.com/sdk/) yesterday in hope of fixing this issue and the issue still exists.

@tbonfort tbonfort was assigned Jul 23, 2013
tbonfort added some commits Jul 23, 2013
@tbonfort tbonfort avoid rendering symbols with 0 scale (#4654)
sending in symbols with a 0 zero scale seems to mess up cairo, even
though our use of cairo_save/cairo_restore should have taken care
of this.
b5f7b8f
@tbonfort tbonfort fix stupid issue with gd renderer b24113d
@tbonfort tbonfort added a commit that referenced this pull request Jul 23, 2013
@tbonfort tbonfort avoid rendering symbols with 0 scale (#4654)
sending in symbols with a 0 zero scale seems to mess up cairo, even
though our use of cairo_save/cairo_restore should have taken care
of this.
e3bd202
@tbonfort
Member

applied to branch-6-2 in e3bd202 , closing

@tbonfort tbonfort closed this Jul 23, 2013
@tbonfort tbonfort deleted the tbonfort:b4654-cairo-0-scale-fix branch Jul 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment