[Cartoweb-users] pdf-export of big table => table is "distorted"

Bruno Friedmann bruno at ioda-net.ch
Wed Mar 30 11:59:02 EST 2011


On 03/30/2011 03:49 PM, Stefan Neumeier wrote:
>   Dear all,
> 
> I have some problems with the pdf-output of the query tables result when 
> using exportPDF.
> When the query-result table contains long column names and quite a few 
> columns so that
> the whole table does not fit on one page (concerning its width) in the 
> pdf-output some columns get "squeezed"
> so that the content is not readable anymore. furthermore at the bottom 
> end of the page the
> table cells somehow get out of line meaning some cells appear bigger in 
> width and height than the other cells.
> 
> Has anyone of you already encountered this error and is there a known 
> workaround?

We apply some truncate on the col name so if there's long header and small content we "manage" that effect
> 
> Would it be possible to automatically split the table horizontally if it 
> does not fit into the page and
> align the split parts one below the other (as several tables)? (If yes 
> where to begin?)

The best solution would be that crappy fpdf able to add a return in the cell box content when the text doesn't fit.
Otherwise, sometimes even in landscape mode, one day or another you will have the same "feature" :-)

The autorotation is on my desk, and can be one of the most simplier to do. We eventually have the idea to force that.

> 
> Another possible solution I can think of is to "export" the table as jpg 
> etc., and resize it according to
> the page size (A4 in my application) and insert it as picture...but 
> again I can not figure out where to start.

That would not work, what about the dpi of your jpg, if the pdf asked is in 300dpi or more ?
And then you will loose the ability to search in pdf, which is really usefull for many of users.

> 
> Best regards,
> Stefan

All parts of the pdf plugins client and server are to be checked, and look if new extensions or hacks has been produced for fpdf
Or use another lib and rewrite (implement it in cw3) there's a example how to with pdflib light ( the big one is not free and
has cost)

-- 

Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch

openSUSE Member & Ambassador
GPG KEY : D5C9B751C4653227
irc: tigerfoot


More information about the Cartoweb-users mailing list