# Render (export) entire document as image

## Background

Using LyX to create a document and xetex to leverage a TrueType font. The entire text is within a minipage. Ultimately, I'm trying to produce the following output (no white page background, single image, captured from OpenOffice):

## Problem - Update #1

Adding tolerance and emergencystretch produces:

## Preamble

The document preamble:

\usepackage{fontspec}% provides font selecting commands
\usepackage{xunicode}% provides unicode character macros
\usepackage{xltxtra} % provides some fixes/extras
\setmainfont{Franklin Gothic Book}
\usepackage[parfill]{parskip}
\usepackage[none]{hyphenat}
\usepackage{microtype}
\usepackage[margin=0.2in]{geometry}

\setlength{\textwidth}{6cm}
\tolerance=1
\emergencystretch=\maxdimen


## Idea - Update #2

The program pdfcrop can be used to remove all the extra whitespace in the margins.

## Question

How can you render a document as a single image (or as one very, very long page), ignoring any pagination, in a justified (newspaper-style) column format?

Thank you!

-
1) Why do you supress hyphenation (all newspapers hyphenate, it's very ugly non-hyphenated like the OOO image you show). 2) Your package combination seems to disable ligature for -- to become one long dash. I guess that the only lines of the preable you need are fontspec and \setmainfont. 3) Then just putting \setlength{\paperheight}{100in}\setlength{\textheight}{96in} in the preamble should be enough. 4) Using \usepackage{microtype} you can get slightly better-looking result. –  yo' Jun 10 '12 at 22:38
Can you use the geometry package to force the text shape you need? That may allow one very long page, which wouldn't print nicely but could be captured from the pdf as the image you want. –  Ethan Bolker Jun 10 '12 at 22:52
@DaveJarvis How long is the text? –  egreg Jun 10 '12 at 22:58

I really can't understand why you don't want hyphenation. Setting \tolerance=1 is quite dubious. Remove HyphenChar=None if you want to switch hyphenation on.

\documentclass{article}
\usepackage{geometry}
\geometry{paperheight=\maxdimen,paperwidth=6.2cm,margin=0.1cm}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX,HyphenChar=None]{Franklin Gothic Book}

\usepackage[parfill]{parskip}

\usepackage{kantlipsum} % mock text

\begin{document}
\emergencystretch=\maxdimen

\kant

\end{document}

-
Hmm. Package xkevyal Error: 'TeX' undefined in families 'Ligatures'. –  Dave Jarvis Jun 10 '12 at 23:20
@DaveJarvis You have surely an outdated version of fontspec. Use Mapping=tex-text instead of Ligatures=TeX, but it's better to upgrade your TeX distribution. –  egreg Jun 11 '12 at 5:30