Opened 17 years ago

Closed 13 years ago

#2344 closed defect (fixed)

pdf output: labels mangled and not buffered, vector lines disjoined

Reported by: sieczka Owned by: zjames
Priority: normal Milestone: 6.0 release
Component: Output-PDF Version: 5.0
Severity: normal Keywords: pdf,
Cc: unicoletti@…

Description

This report applies to both MS 4.10.2 and 5.0.

In PDF output national characters in labels are rendered wrong, labels are not buffered and vector lines have some turns not round (looks like lines are disjoined at some vertices). All these look nice and round in PNG output.

Please compare the attached PDF and PNG, both created with MS 5 shp2img. The PNG is OK, PDF has artifacts.

I'm also attaching the input shapefile and map file which can be used to reproduce the problem. DBF is in UTF-8 and my locale environment is all UTF-8 too.

Ubuntu Dapper 32bit, using PDFLib-Lite 7.0.2. If more details are needed please let me know.

Attachments (4)

map.pdf (7.1 KB ) - added by sieczka 17 years ago.
output pdf with artifacts
map.png (38.9 KB ) - added by sieczka 17 years ago.
output png - all OK
sampledata.tar.bz2 (8.9 KB ) - added by sieczka 17 years ago.
sample data: the map file, shapefile, font
mappdf.patch (307 bytes ) - added by zjames 17 years ago.
line join fix

Download all attachments as: .zip

Change History (15)

by sieczka, 17 years ago

Attachment: map.pdf added

output pdf with artifacts

by sieczka, 17 years ago

Attachment: map.png added

output png - all OK

by sieczka, 17 years ago

Attachment: sampledata.tar.bz2 added

sample data: the map file, shapefile, font

comment:1 by sieczka, 17 years ago

The font file was to big to be uploaded to Trac. It was a FreeSans.ttf from Ubuntu Dapper distro, FWIW. Any other font should be OK too.

comment:2 by sdlime, 17 years ago

Component: MapServer C LibraryOutput-PDF
Owner: changed from sdlime to mapserverbugs

comment:3 by unicoletti, 17 years ago

Cc: unicoletti@… added

comment:4 by zjames, 17 years ago

Owner: changed from mapserverbugs to zjames
Status: newassigned

The disjoined lines are an easy fix - the linecaps were not being set to round as is done with other renderers. I'm going to have to look into the label problems a little further. Can you give it a try after applying the attached patch?

by zjames, 17 years ago

Attachment: mappdf.patch added

line join fix

in reply to:  4 comment:5 by sieczka, 17 years ago

Keywords: pdf → pdf,

Replying to zjames:

The disjoined lines are an easy fix - the linecaps were not being set to round as is done with other renderers. I'm going to have to look into the label problems a little further. Can you give it a try after applying the attached patch?

It works perfect. Thanks!

BTW -there is an identical issue with SVG output. And 2 other things wrong with SVG: most labels ignore ANGLE AUTO (though not all, and I can't see a pattern for that), every time I run shp2img to create an SVG output I get 2 SVGs - the output and it's copy named like "47067829_223b_0.svg" (seems a temporary file is not removed). Described issues are reproducible with the sample data attached to this ticket. Should I open a separate ticket for SVG problems?

comment:6 by zjames, 17 years ago

Yes, enter a separate ticket or tickets for SVG, please.

in reply to:  6 comment:7 by sieczka, 17 years ago

Replying to zjames:

Yes, enter a separate ticket or tickets for SVG, please.

Done: #2345.

comment:8 by assefa, 16 years ago

Milestone: 5.0.1 release5.2 release

Applying patch to set the linecaps r 7299.

Setting it for 5.2 for the label problems.

comment:9 by dmorissette, 16 years ago

Milestone: 5.2 release5.4 release

comment:10 by dmorissette, 15 years ago

Milestone: 5.6 release6.0 release

comment:11 by tbonfort, 13 years ago

Resolution: fixed
Status: assignedclosed

this bug isn't relevant anymore with the 6.0 cairo output for pdf.

Note: See TracTickets for help on using tickets.