[Cartoweb-users] pdf settings

Alexandre Saunier alexandre.saunier at camptocamp.com
Wed Jun 15 04:58:39 EDT 2005


Hi,

Fred Bauer a écrit :
> I succeeded in solving the problem of scale in pdf.  Simply by putting a 
> maxscale of 74000 at the place of 50000 (60000 was not enough!). But it 
> is still mysterious for me.

That's definitely not normal. If you want to see what scale is used in 
your PDF, add the "scaleval" block in the "general.activatedBlocks" 
parameter of your exportPdf.ini. With default config, this will display 
the scale info in the top right corner of your PDF first page.

It should be the same (or very close) scale than in the Cartoweb HTML 
interface. Indeed, requirements for CW PDF documents are :
- same scale than in HTML viewer
- same center point
- same layers

Perhaps you could try to set your mapfile RESOLUTION to 96 dpi.


> I have now other questions :
> - when using a resolution of 300dpi for the pdf, the fontsize from the 
> scale and the drawings (outline plugin) become very very small. And it's 
> not possible to change the fontsize through de exportpdf.ini. The scale 
> and the drawings are considered as pictures. Is there any solution ?

Mapserver scalebars labels use bitmap fonts that have 5 predefined 
fontsizes (eg. small, large...) and not truetype ones that use pixel 
sizes. High resolution maps are computed by asking for bigger images 
that are then shrunk, thus increasing the number of "pixels" per inch. 
The resizing also affects the labels but CW adapts them by applying a 
fontsize ratio but encounters some limitations with non-truetype labels 
such as scalebars ones.

> - My second question is about the margin in a page in format A3. All my 
> horizontalMargin or verticalMargin are to 10 or less. But on the pdf the 
> margin are about 45. The problem appears only in format A3. Which 
> parameters could I change ?

Default margins are set in exportPdf.ini using  general.horizontalMargin 
and general.verticalMargin.
In addition you may individually override those settings for given 
formats. The default exportPdf.ini thus brings overriden margin settings 
for A3 margin. To neutralize the overriding, simply remove or comment 
the matching lines.

CW doc also gives details here:
http://cartoweb.org/doc/xhtml/user.pdf.html#user.pdf.reference.format
http://cartoweb.org/doc/xhtml/user.pdf.html#user.pdf.tutorial.overall.formats

> - My last question is about the queries tables. Sometimes the tables are 
> too big in width, and the result isn't readable. How could I split the 
> tables if it they are bigger than the page width ?

A set of texts sizes detections is performed and should normaly adapt 
the size of tables rows and columns. It may be a little buggy and not 
work perfectly with really-crowded tables. In the meantime you may try 
to use a smaller fontsize for your table blocks using 
blocks.queryResult.fontSize parameter (default is 12pt).

> A last question about the mailing list, I'm not accustomed to it. How 
> can I answer specifically to a post, without sending a mail all? Should 
> I answer specifically to the person who sent the post?

The mailing list is intended to share tips, experiences, etc about CW. 
The archives (http://lists.maptools.org/pipermail/cartoweb-users/) and 
the search engine 
(http://lists.maptools.org/search.phtml?config=cartoweb-users) are great 
tools to build a useful knowledge base. If you think your answer may 
interest the community, don't hesitate to "reply-to-all". Otherwise a 
simple "reply-to" should work.

Alex




More information about the Cartoweb-users mailing list