Group Abstract Group Abstract

Message Boards Message Boards

How to insert pagebreaks when exporting a List to .pdf file?

Posted 2 years ago
POSTED BY: Richard Frost
9 Replies
POSTED BY: Richard Frost

The cell option PageBreakWithin -> True may play a role.

POSTED BY: Gianluca Gorni

Maybe you can send the output to a blank notebook and print that?

POSTED BY: Gianluca Gorni

How is that done?

POSTED BY: Richard Frost
Posted 2 years ago

The attached pdf is multipage. Got it by evaluating myTable in a blank notebook. Deleted the input cell, and did set the notebook option ShowCellLabel to False. Then saved the notebook as a pdf.

Attachments:
POSTED BY: Hans Milton

Thank Hans, but I need a solution relying only on Wolfram Language. The manual steps you describe will become too tedious for the number of documents I need to produce.

POSTED BY: Richard Frost
Posted 2 years ago

Here is a way that reduces, but does not eliminate, the need for manual actions:

myTable = Column[
  Row[{"description", MatrixForm[GraphDistanceMatrix[#]], #},Spacer[12]] & /@ GraphData["HeawoodGraph", "Graph", "All"],
  Automatic,1
];
myPDF=FileNameJoin[{$HomeDirectory, "Desktop", "myTable"}];
FrontEndExecute[FrontEndToken[CreateDocument[myTable,NotebookFileName->myPDF],"SaveRename"]]
POSTED BY: Hans Milton

Try printing the output cell to pdf from the Front End.

POSTED BY: Gianluca Gorni

To eliminate manual processing, I would need to write the List to a Cell and then Export the Cell to a file. Do you have a working example that produces multi-page output?

POSTED BY: Richard Frost
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard