Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to export a large Grid/Table on a single PDF page?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116188] Re: How to export a large Grid/Table on a single PDF page?
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Fri, 4 Feb 2011 01:41:11 -0500 (EST)
  • References: <iidvt7$bgb$1@smc.vnet.net>

On Feb 3, 9:26 pm, "M.Roellig" <markus.roel... at googlemail.com> wrote:
> Dear group,
>
> from time to time I would like to export a Grid or Table as PDF such
> that the whole
> thing is scaled to fit a single page (portrait or landscape). What is
> the preferred way to
> do this? The Options part in the "PDF" help page is somewhat sparse.
>
> Right now I export the table to Excel and create the PDF there. If not
> PDF, maybe another
> Export format could be faciliated??
>
> I attach an example for you to play around:
>
> transs = {1, 3, 3, 49, 49, 1, 3, 15, 30};
> species = {"A", "B", "C", "D", "E", "F", "G", "H", "I"};
> parcolnum = 0;
> poss = Drop[Accumulate[Prepend[transs, 1]] + parcolnum - 1, -1];
> translist =
>   PadRight[#, Max[transs], ""] & /@
>    Table[Table[
>      species[[j]] <> " " <> ToString[i] <> "-" <> ToString[i - 1], {i,
>        1, transs[[j]]}], {j, 1, Length[transs]}];
> collist =
>   PadRight[#, Max[transs], ""] & /@
>    Table[Table[poss[[i]] + j, {j, 1, transs[[i]]}], {i, 1,
>      Length[species]}];
> grid = Grid[Transpose@Riffle[translist, collist],
>   Alignment -> {Left, Baseline}]
>
> Export[<filename>,grid,"PDF"]  (* gives a rather unreadable PDF*)
>
> Any input is appreciated,
>
> Markus


A quick and dirty solution would be to export as an image and control
the image size:

Export["test.tif", grid, ImageSize -> 600]

This is ok for on screen but when you then try and include and higher
image resolution (for printing) it breaks:

Export["test.tif", grid, ImageSize -> 600,ImageResolution->300]

leaving you back to square one. I presume the ImageResolution thing is
a bug rather than a feature.

Mike


  • Prev by Date: Re: Pattern matching in lists
  • Next by Date: request help
  • Previous by thread: How to export a large Grid/Table on a single PDF page?
  • Next by thread: Re: Protect a variable against being used as an iterator