Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Output of subset of pages with PDFTeX

4 views
Skip to first unread message

J. Scott Berg

unread,
Mar 23, 1999, 3:00:00 AM3/23/99
to
I would like to have pdftex output only a subset of the pages in my
document, like I could have dvips do. There are two ways of doing
this that I know of:

1) Using Exchange on the pdf file. Not a good solution for those of
us in UNIX land, not to mention a bit pricey for the task.
2) Using dvipdfm and dvidvi. This seems to produce messier pdf than
pdftex does (lots of extra font encoding junk?).

I'm trying to determine if there are better solutions out there than
these. So are there any PDF page subset selection tools out there, or
any tricks for pdftex to get it to output only selected pages? Thanks

-Scott Berg


Mark A. Wicks

unread,
Mar 23, 1999, 3:00:00 AM3/23/99
to J. Scott Berg
On 23 Mar 1999, J. Scott Berg wrote:

> I would like to have pdftex output only a subset of the pages in my
> document, like I could have dvips do. There are two ways of doing
> this that I know of:
>
> 1) Using Exchange on the pdf file. Not a good solution for those of
> us in UNIX land, not to mention a bit pricey for the task.
> 2) Using dvipdfm and dvidvi. This seems to produce messier pdf than
> pdftex does (lots of extra font encoding junk?).

First, the latest version of dvipdfm does exactly what you want without
needing dvidvi. Pdftex would require quite a bit of coaxing to get it to
do this.

Second, I don't know what you mean by "messier". Very little of a PDF
file is "clean" to somebody viewing it in a text editor. Perhaps you
should be more specific. I can't imagine anything that dvipdfm puts in a
PDF file that might be called "font encoding junk" that pdftex would not
also put in its output. In fact, pdftex typically puts *more* encoding
information in the file than dvipdfm. The information you are referring
to is probably still present in the pdftex output. By "messy," you may
referring to the fact that dvipdfm puts some of its font information at
the beginning and pdftex puts its font information at the end (If so, I'd
like why that's necessarily messy.) Pdftex probably puts the font
information at the end by convenience and not by design. Like TeX, pdftex
processes fonts as it encounters them, so it wouldn't be easy for it to
put the font information at the beginning. Since dvipdfm reads a DVI
file, it knows about all the fonts used in the document, even those on the
last page, so it is able to (and does) define information such as font
metrics up front.

Third, some of the things that dvipdfm does are arguably "tidier" than
what pdftex does (I am sure the reverse is true as well---each programs
has its strengths/weaknesses). Being "messier" to a human being does not
necessarily mean "messier" to a computer program. For example, dvipdfm
outputs balanced page and name trees which helps accelerate reader access
to random pages and hyperlink targets, but such structures are difficult
for a human being to trace through with a text editor.

If you want to undertake a fair and balanced comparison of the quality
of the output of the two programs, many people would surely be interested,
but an unsubstantiated remark that dvipdfm produces messier output isn't
very helpful.

______________________________________________________________________

Mark A. Wicks, Associate Professor mwi...@kettering.edu
ECE Department, Kettering University Voice: (810) 762-7992
1700 West Third Ave, Flint, MI 48504-4898 Fax: (810) 762-9830


J. Scott Berg

unread,
Mar 24, 1999, 3:00:00 AM3/24/99
to
In article <Pine.LNX.3.96.990323...@odo.kettering.edu>,

Mark A. Wicks <mwi...@kettering.edu> wrote:
>On 23 Mar 1999, J. Scott Berg wrote:
>
>> I would like to have pdftex output only a subset of the pages in my
>> document, like I could have dvips do. There are two ways of doing
>> this that I know of:
>>
>> 1) Using Exchange on the pdf file. Not a good solution for those of
>> us in UNIX land, not to mention a bit pricey for the task.
>> 2) Using dvipdfm and dvidvi. This seems to produce messier pdf than
>> pdftex does (lots of extra font encoding junk?).

Let me rephrase my question. Is there a way to use pdftex to output a
subset of the total set of pages in the file (I would think the answer
to this is no)? If not, is there a tool other than Exchange which
will create a PDF file containing a subset of the pages from another
PDF file? Anyone wishing to discuss dvipdfm can safely remove
everything above this point.

> If you want to undertake a fair and balanced comparison of the quality
>of the output of the two programs, many people would surely be interested,
>but an unsubstantiated remark that dvipdfm produces messier output isn't
>very helpful.

I most emphatically do NOT wish to "undertake a fair and balanced
comparison of the quality of the output of the two programs."

Maybe this is a bug, maybe it is a configuration error on my part. I
don't know. But despite several hours (which I don't exactly have to
spare) of fooling around trying to get things to work, I haven't been
able to get dvipdfm to produce what I would call acceptable output.
Thus "messier" is a bit of an understatement. Here's the situation:

Source is a LaTeX file which uses the times package and produces
output using only Times-Roman, Times-Italic, and Times-Bold. Output
is 5 pages.

pdftex output: 12,704 bytes, 29 objects in pdf file. Views nicely
using xpdf, Acrobat reader.

dvipdfm output: 77,584 bytes, 203(!) objects in pdf file. Unviewable
with xpdf (this is xpdf's fault), fonts don't antialias in Acrobat
Reader. Source of the problem seems to be that dvipdfm actually
generates pk fonts for the Times fonts and embeds them! My guess is
that it is that the problem is non-existence of afm files, but I'm not
sure where to find them. FYI I handn't made most of this diagnosis at
the time I made the post. This is what I meant by "messier." I
intended my comment to be ignored and people to assume "he doesn't
want to use dvipdfm."

dvipdfm 0.10.3 was installed out-of-the-box, I have a full web2c-7.2
setup, all fonts and associated files out of
fonts/psfonts/lw35nfss.zip. Once I installed the afm files for the CM
fonts, I had no problem with files containing only CM fonts.

-Scott Berg


Heiko Oberdiek

unread,
Mar 24, 1999, 3:00:00 AM3/24/99
to
On 24 Mar 1999 08:19:20 GMT, jsb...@earthlink.net (J. Scott Berg)
wrote:

>Let me rephrase my question. Is there a way to use pdftex to output a
>subset of the total set of pages in the file (I would think the answer
>to this is no)?

I have written package pagesel.sty as an answer to a similar question
in de.comp.text.tex, see:
http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=450111880

Usage: \usepackage[1,4-8]{pagesel}
prints pages 1, 4, 5, 6, 7, and 8

Currently I am working for a CTAN release.

Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>

Mark A. Wicks

unread,
Mar 24, 1999, 3:00:00 AM3/24/99
to J. Scott Berg

To comp.text.tex readers, I apologize for prolonging this discussion
any more than necessary. But, because Usenet posting are archived,
indexed and searched, I feel it is important to clarify a few points. This
will be my final public posting on this subject.

On 24 Mar 1999, J. Scott Berg wrote:

> >> 2) Using dvipdfm and dvidvi. This seems to produce messier pdf than
> >> pdftex does (lots of extra font encoding junk?).

> Reader. Source of the problem seems to be that dvipdfm actually


> generates pk fonts for the Times fonts and embeds them! My guess is

> Maybe this is a bug, maybe it is a configuration error on my part. I

It is almost certainly a configuration error (path searching). Dvipdfm
will use PK fonts *only* as a last resort (if it cannot find either a Type
1 font, built-in font, or a .vf file). In fact, at one time, I considered
having dvipdfm *refuse* to embed PK fonts because I knew the time would
come when someone would complain about the output quality and blame
dvipdfm. Others wanted this feature. You do have to work a bit harder to
get pdftex to include PK fonts.

> > If you want to undertake a fair and balanced comparison of the quality
> >of the output of the two programs, many people would surely be interested,
> >but an unsubstantiated remark that dvipdfm produces messier output isn't
> >very helpful.

> I most emphatically do NOT wish to "undertake a fair and balanced
> comparison of the quality of the output of the two programs."

That was clear from your original posting. If you don't want to
compare them fairly (both properly configured, etc.) then please don't
compare them at all.

> I intended my comment to be ignored and people to assume "he doesn't
> want to use dvipdfm."

I understood that you didn't want to use dvipdfm, but please don't
spread half-truths about it because you choose not to use it. Usenet
postings are archived permanently and frequently searched. Somebody who
knows nothing about the software in question might not know how to
properly weight your remarks. The whole truth is "dvipdfm when
misconfigured produces messier output than pdftex when properly
configured". Another true statement might have been "I spent many hours
trying to get dvipdfm properly configured and couldn't figure out how to
do it."

I apologize if I seem defensive about this. Keep in mind that people
write these programs. You remarked that your time is precious. I have
many months invested in dvipdfm. I don't want to see its reputation
sullied by a cavalier remark.

> Source is a LaTeX file which uses the times package and produces
> output using only Times-Roman, Times-Italic, and Times-Bold. Output
> is 5 pages.

I attempted to duplicate this test with both programs configured
properly. Here are the results

> pdftex output: 12,704 bytes, 29 objects in pdf file. Views nicely

> dvipdfm output: 77,584 bytes, 203(!) objects in pdf file. Unviewable

pdftex output: 9793 bytes, 28 objects
dvipdfm output: 12707 bytes, 35 objects

Both view fine in both Acrobat Reader and xpdf.

J. Scott Berg

unread,
Mar 25, 1999, 3:00:00 AM3/25/99
to
In article <36f8ffb...@news.uni-freiburg.de>,
Heiko Oberdiek <ober...@ruf.uni-freiburg.de> wrote:

>I have written package pagesel.sty as an answer to a similar question
>in de.comp.text.tex, see:
>http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=450111880
>
>Usage: \usepackage[1,4-8]{pagesel}
>prints pages 1, 4, 5, 6, 7, and 8

I pulled down the file and it works well. The one problem is that it
requires me to modify the source file; it would be nice to keep the
source file intact and just select the pages that you want from the
command line. I sort of achieve this with a bit of a command line
hack by putting in

\ifx\pagesel_pages\undefined\else\usepackage[\pagesel_pages]{pagesel}\fi

and then running latex as

latex '\def\pagesel_pages{1,4-8}\input file.tex'

when I want only a subset of the pages. Thus I only need to modify
the source file once then I can leave it as is forever, and
"latex file.tex" will output all pages.

Thus far it's the best solution I have. Thanks!

-Scott Berg


J. Scott Berg

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
Mark Wicks and I discussed things a bit offline and figured out what
was going on. dvipdfm wanted AFM files for the standard 35 fonts,
which I hadn't installed. CTAN no longer has the AFM files for the
standard 35 fonts (apparently because of copyright concerns), and so I
never installed them (my installation is fairly recent and is based on
web2c-7.2, not TeTeX or another distribution).

I solved the problem by pulling down the AFM files from adobe:

ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles/base35

For the thread about the afm files being dropped from CTAN (which
includes bonus discussions on whether the plural of afm is afm's or
afms, how to form plurals and possessives in Swedish, and various
aspects of the Finnish language; what more could you ask for?):

http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=365899424

I then rewrote the pdffonts.map file form dvipdfm to use those afm
files. Now dvipdfm seems to be working fine.

So has anything changed since the aforementioned thread from last
summer, or are the afm files for the standard 35 considered gone as
far as CTAN is concerned? Has anyone actually talked with Adobe about
this?

-Scott Berg


Athanassios Protopapas

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to

It seems like the right person for my question is here. I tried to
install and configure dvipdfm and failed and I don't know exactly why.
I have a PC running Linux 2.2.2 with teTeX installed from Slackware (and
upgraded with the mid-1998 LaTeX release). I think I have all
postscript and virtual fonts since I use times a lot and xdvi/dvips work
fine. I really like the idea of converting from dvi as opposed to
recompiling (as with pdftex) plus I have not managed to install pdftex
either (complains about formats and in general won't merge into my
setup---I've spent some unsuccessful time on that too). Anyway, on
installing dvipdfm:

So first I tried to compile dvipdfm but it requires the kpathsea library
and I don't seem to have that. I tried to install texk from 4allTeX but
that installed everything *except* the kpathsea library (and screwed up
my setup and I had to reinstall teTeX but that's another story), even
when I changed into the kpathsea directory and tried to install from
there. Also, moving kpathsea.a to /usr/local/lib didn't help. I don't
know where to get the "kpathsea library" in a form that will compile and
install and won't upset teTeX, so that was the end of that.

Then I downloaded the binary file kindly provided for Linux; I picked
the statically linked version so I wouldn't have to worry about
libraries. I followed the installation instructions except I was unsure
about the postscript versions of the cm fonts which I probably don't
have (but don't even need for the documents I need to convert because
they use Times). Then running dvipdfm complains about not finding
TFMLIB. Setting all of the recommended environment variables made no
difference whatsoever.

So I am back at the beginning and I would appreciate some pointers, if
possible. Thanks a lot in advance.

Thanassi

--
Athanassios Protopapas, PhD Department of Educational Technology
Phone: +30 1 680 0959 Institute for Language and Speech Processing
Fax: +30 1 685 4270 Epidavrou & Artemidos 6, Marousi
e-mail: prot...@ilsp.gr GR-151 25 ATHENS, Greece

Sven Hartrumpf

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
Athanassios Protopapas <prot...@ilsp.gr> writes:

> So first I tried to compile dvipdfm but it requires the kpathsea library
> and I don't seem to have that.

No, you have it (if you are using teTeX) :)
Get the latest version of dvipdfm (0.10.3) from
http://odo.kettering.edu/dvipdfm/
and please read carefully item 2. in the file INSTALL.

Hope this helps.

Sven
------------------------------------------------------------------------------
Sven Hartrumpf e-mail: Sven.Ha...@FernUni-Hagen.de
Computer Science VII (AI) phone: +49 2331 987 4553
University of Hagen fax: +49 2331 987 392
58084 Hagen - Germany http://www.informatik.fernuni-hagen.de/pi7/hartrumpf

Sven Hartrumpf

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to

I got dvipdfm (0.10.3) working with teTeX 0.9 (from 1999-02-22), finally.

You don't have to set any environment variables.
The important trick is that dvipdfm (and ebb) must be copied to the directory
where teTeX's kpsewhich, latex etc. reside.

dvipdfm is a great tool!

Hope this helps more :)

MicroPress, Inc.

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to

On Mon, 29 Mar 1999 13:23:26 +0300, Athanassios Protopapas
<prot...@ilsp.gr> wrote:

>
>It seems like the right person for my question is here. I tried to
>install and configure dvipdfm and failed and I don't know exactly why.
>I have a PC running Linux 2.2.2 with teTeX installed from Slackware (and
>upgraded with the mid-1998 LaTeX release). I think I have all
>postscript and virtual fonts since I use times a lot and xdvi/dvips work
>fine. I really like the idea of converting from dvi as opposed to
>recompiling (as with pdftex) plus I have not managed to install pdftex
>either (complains about formats and in general won't merge into my
>setup---I've spent some unsuccessful time on that too). Anyway, on
>installing dvipdfm:
>

If you are looking for a TeX->PDF compiler under Linux, download VTeX.
http://www.micropress-inc.com/linux

It will convert .tex->,pdf together with external (eps) and inline
(pstricks/psfrag) postscript graphics.

You can also take it from CTAN,
/systems/linux/micropress

The current version propagates through CTAN now & not up-to-date on
all sites, make sure that vtexlnx.tar.gz is dated 3/25

0 new messages