mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
185 stars 416 forks source link

Support for 3-digit hex shorthand color codes #113

Open justb4 opened 10 years ago

justb4 commented 10 years ago

Using MFP (print-servlet-2.0-SNAPSHOT-130829) with GXP/GeoExt in Heron to print Vector Layers.Example: lib.heron-mc.org/heron/latest/examples/vectorstyler

Three-digit hexcodes like the initial blue in the redlining tool #07f in the above example give very dark effects when printing via MFP. This issue is to supply support for 3-digit hexcodes like #07f . These expand to #0077ff. See Shorthand hexadecimal form in http://en.wikipedia.org/wiki/Web_colors. I'm not crazy about these shorthands, but some external JS (OLEditor) uses three-color codes...

milovanderlinden commented 10 years ago

This is implemented in itextpdf: http://api.itextpdf.com/itext/html/WebColors.html

milovanderlinden commented 10 years ago

Confirmed. Tested this with itextpdf implemented instead of lowagie. itextpdf will parse shorthand (#f00) correctly as red

justb4 commented 10 years ago

Ok, thanks for looking into. Guess switching from lowagie to itextpdf is not trivial. Possibly the code may be expanded in MFP core Java code?

milovanderlinden commented 10 years ago

It is a pretty big patch as it almost touches all Java sources. But I will put together a pull request that solely covers the upgrade from lowagie to itextpdf. Op 20 mei 2014 10:27 schreef "Just van den Broecke" < notifications@github.com>:

Ok, thanks for looking into. Guess switching from lowagie to itextpdf is not trivial. Possibly the code may be expanded in MFP core Java code?

— Reply to this email directly or view it on GitHubhttps://github.com/mapfish/mapfish-print/issues/113#issuecomment-43598925 .