Ticket #2344 (assigned defect)

Opened 1 year ago

Last modified 2 months ago

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

Reported by: sieczka Assigned to: zjames (accepted)
Priority: normal Milestone: 5.4 release
Component: Output-PDF Version: 5.0
Severity: normal Keywords: pdf,
Cc: unicoletti@prometeo.it

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

map.pdf (7.1 kB) - added by sieczka on 10/04/07 12:08:46.
output pdf with artifacts
map.png (38.9 kB) - added by sieczka on 10/04/07 12:09:17.
output png - all OK
sampledata.tar.bz2 (8.9 kB) - added by sieczka on 10/04/07 12:20:46.
sample data: the map file, shapefile, font
mappdf.patch (307 bytes) - added by zjames on 10/05/07 09:24:32.
line join fix

Change History

10/04/07 12:08:46 changed by sieczka

  • attachment map.pdf added.

output pdf with artifacts

10/04/07 12:09:17 changed by sieczka

  • attachment map.png added.

output png - all OK

10/04/07 12:20:46 changed by sieczka

  • attachment sampledata.tar.bz2 added.

sample data: the map file, shapefile, font

10/04/07 12:24:33 changed by sieczka

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.

10/04/07 13:37:41 changed by sdlime

  • owner changed from sdlime to mapserverbugs.
  • component changed from MapServer C Library to Output-PDF.

10/05/07 02:46:03 changed by unicoletti

  • cc set to unicoletti@prometeo.it.

(follow-up: ↓ 5 ) 10/05/07 09:23:31 changed by zjames

  • status changed from new to assigned.
  • owner changed from mapserverbugs 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?

10/05/07 09:24:32 changed by zjames

  • attachment mappdf.patch added.

line join fix

(in reply to: ↑ 4 ) 10/05/07 13:49:56 changed by sieczka

  • keywords changed from pdf to 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?

(follow-up: ↓ 7 ) 10/05/07 14:23:14 changed by zjames

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

(in reply to: ↑ 6 ) 10/05/07 15:13:32 changed by sieczka

Replying to zjames:

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

Done: #2345.

01/23/08 10:14:58 changed by assefa

  • milestone changed from 5.0.1 release to 5.2 release.

Applying patch to set the linecaps r 7299.

Setting it for 5.2 for the label problems.

07/16/08 09:56:22 changed by dmorissette

  • milestone changed from 5.2 release to 5.4 release.