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

MathGroup Archive 2011

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

Search the Archive

Problems Exporting to PDF

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115693] Problems Exporting to PDF
  • From: Helen Read <readhpr at gmail.com>
  • Date: Tue, 18 Jan 2011 05:52:27 -0500 (EST)

I have some (lots) of rather long Grids, each of which needs to be 
exported to a .pdf. Unfortunately, the grid gets exported as a single 
page, which is a mess if you try to print it from Adobe Acrobat.

Here's a toy example to see what I am talking about. (The actual data is 
confidential results of online course evaluations for all classes taught 
in my department during the semester that just ended.)

SetDirectory[NotebookDirectory[]];

grid5 = Grid[
   Table[Flatten[{"Question " <> ToString[n],
      RandomInteger[{10^5, 10^8}, 5]}], {n, 100}], Frame -> All];

Export["grid5.pdf", grid5]

It doesn't look to awful just reading it in Adobe Acrobat, but go to 
print and check out the preview. It's a wreck no matter what you choose 
for the Page Scaling.

Is there any way to force page breaks in the exported .pdf? I couldn't 
find anything of help in the Documentation for Export.

So I finally resorted to the following.

grid6 = Grid[
   Table[Flatten[{OutputForm["Question " <> ToString[n]],
      RandomInteger[{10^5, 10^8}, 5]}], {n, 100}], Frame -> All];

path = Directory[];

nb5 = CreateDocument[grid5, PageBreakWithin -> True, Visible -> False];
NotebookPrint[nb5, path <> "\\nb5.pdf"]

This is better, and looks pretty reasonable for this example, but when 
we were working with the actual data this afternoon, pages were breaking 
in the middle of a line of a row. The last row of text and data on page 
1 was cut in half, printing half on one page and half on the next 
(breaking right in the middle of the characters).

Also, a couple of oddities:

1. Without putting OutputForm[] around the strings, they print with 
quotes around them.

2. No idea where the .pdf goes from NotebookPrint if the full path isn't 
specified. It didn't go to the directory that was set, nor to 
$UserBaseDirectory, nor anywhere else that I looked.

-- 
Helen Read
University of Vermont


  • Prev by Date: Using FindRoot on an equation involving Log terms
  • Next by Date: Re: Tooltip in a Plot of a List
  • Previous by thread: Re: Using FindRoot on an equation involving Log terms
  • Next by thread: Re: Problems Exporting to PDF