New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into
base: branch-6-2
from

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Jul 23, 2013

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort May 14, 2013

Member

which mapserver version?

Member

tbonfort commented May 14, 2013

which mapserver version?

@DoofyMcDoofus

This comment has been minimized.

Show comment
Hide comment
@DoofyMcDoofus

DoofyMcDoofus May 14, 2013

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.

DoofyMcDoofus commented May 14, 2013

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.

@ghost ghost assigned tbonfort Jul 23, 2013

tbonfort added some commits Jul 23, 2013

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.

tbonfort added a commit that referenced this pull request Jul 23, 2013

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.
@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 23, 2013

Member

applied to branch-6-2 in e3bd202 , closing

Member

tbonfort commented Jul 23, 2013

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