Talk:PDF atlas

From OpenStreetMap Wiki
Jump to: navigation, search

Cairo

guess you should check out cairo's PDF backend instead :D - Sxpert 10:11, 29 May 2006 (UTC)

dont do that its crap, cairo does rasters not vectors - Steve 10:44, 29 May 2006 (UTC)
Cairo is a free software graphics library with multiple backends that provides a vector-based device-independent API for software developers. [...] Future backends are planned that will support output to PDF, PostScript and SVG files. Cairo is designed to use hardware-acceleration when available.- From Wikpedia. Cairo will have PDF output when 1.2.0 is released. - Bruce89 15:54, 29 May 2006 (UTC)
we are now at 1.4.x and the pdf output works great :D

Back to toolkits which exist...

/me is wondering whether PDF::CreateSimple is also creating raster-based output (large filesize and slower redraws than PDF::Create) - is there a way to check by looking at the resulting PDF? Ojw 16:58, 29 May 2006 (UTC)

One way is to zoom in (using Acrobat Reader or similar) and see if it pixelates at any point. Another is to try running it through a PDF compression utility (e.g. PDFshrink, OS X shareware). As for alternative PDF creation... if you're sticking with Perl (which I like even if no-one else round here does (: ), PDF-API2 is wondrous. --Richard 17:22, 29 May 2006 (UTC)

Looks good; I'll write notes on PDF-API2 for that... Ojw 12:38, 31 May 2006 (UTC)

OK, an example of API2's output is online at http://almien.co.uk/OSM/PDF/ -- it's got colours, vectors, and takes 47 seconds to generate that 125KB map of Weybridge. Ojw 18:50, 1 Jun 2006 (UTC)

FO Processor method suggestion

Alternative method would be to use the svg rendered output from osmarender.

This can be placed into a PDF document using an FO processor such as FOP from Apache. A FO document would need to be created which holds a link to the svg image. Both the FO Document and the SVG would then be rendered by the FOP.

The height to width ratio of the image is the only thing I can see which may cause complications. Page size can be set up in the FO document so A4, A3 and other Page sizes could be created once the basics are in place.

The OSMARENDER functions could be hacked to produce the whole of the FO document with inline SVG but this hacked version would need updating independently of the main program.

If I get time I will try this approach out Mister B

History

Downloadable ZIP now contains latest version of source code, osm->text converter, sample coastline (low-res) and OSM data (motorways and A-roads). 1.5MB download total. Ojw 18:05, 16 Jun 2006 (UTC)