Get Publication PDF

Command line:
tlapi ‑cPBLPDF [‑psPhase] [‑u] [‑snShow] [‑PsProfile] [‑isPartList] ‑osPdfFile sPart
Library call:
nStatus = TLpblpdfEx (sPart, sPartList, sPhase, nUpd, nType, sProfile, sOpts, sPdfFile, nShow)
Library call:
nStatus = TLpblpdf (sPart, sPartList, sPhase, nUpd, nType, sPdfFile, nShow)

Function

Create a PDF version of the page images in a list of partitions. This is a useful way of generating a single PDF from all of the partitions in a publication (hence the name), but any list of partitions can be used as the input.

The partitions must have been composed (for example, by using the Compose call).

[Warning] Warning

Any errors or warnings when creating a PDF are written to a log file in the same directory as the output file. The log file has the same name as the output file but with extension “.log” replacing the extension (if any) of the output file. Any existing file with this name will be silently removed.

[Note] Note

The TLpblpdf library call is deprecated and may not be supported in future versions of the API.

Arguments

sPart

The path or pathname mask of the partitions to be included in the PDF.

A partition pathname mask can include file wildcard characters in the last component of the path, for example:

book/*

Note that if a partition list is specified, this argument is ignored, but must still be present.

sPartList

The full pathname of a file containing a list of partitions to be included in the PDF. Each line of the file must contain the path of a single partition.

sPhase

The partition phase from which to take the data. One of INITIAL, PUBLISH, UPDATE or CURRENT. Defaults to PUBLISH, so for a non-looseleaf job it is usual to select INITIAL.

nUpd

If non-zero, only changed pages are included in the PDF. In the command line version, use the ‑u flag to request only changed pages.

This has no effect for non-looseleaf jobs.

nType

Not used. Always pass zero for this argument.

sProfile

The name of the profile that determines options for creating the PDF. Pass NULL for this argument to use the default profile.

sOpts

A string specifying processing options as described in Get PDF.

These options override those specified by the profile. Pass NULL if you do not wish to set any options.

sPdfFile

The full pathname of the output PDF file. If the file already exists, it will be replaced. If the file does not exist, it will be created.

nShow

The Windows showmode for the typesetting progress display. By default, the typesetting dialog will be displayed.

The only useful values are SW_NORMAL (1) and SW_MINIMIZE (6). The latter causes the progress window to run minimised. There is no way to prevent the creation of a window.

This parameter is ignored on Unix.

For additional command line arguments see “Common Flag Arguments”.

Examples

Command line:

tlapi ‑cPBLPDF ‑pINITIAL ‑oC:\man.pdf manuals/*

Library call:

status = TLpblpdfEx("manuals/*", NULL, "INITIAL", 0L, 0L,
           NULL, NULL, "C:\\mydoc.pdf", SW_HIDE)