Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

FormatMako class

PDF

IPDFInput

PostScript

IPSInput

XPS

IXPSInput

PCL5

IPCL5Input

PCL/XL

IPCLXLinput

Mako offers several input classes to parse different PDLs (page description languages) for input. A input class for that PDL (see list above) populates the Mako DOM (document object model) that can then be interrogated or changed. The DOM may then be saved into any of the supported PDLs, enabling rich conversion from one PDL to another.

Any input to any output

However, for PostScript this two-step process is slower than a direct conversion when compared to the performance of Jaws PDF Library (PDFLib), a companion product to Mako. PDFLib offers direct access to the same RIP component that Mako uses, but without the overhead of the Mako DOM.

IDistiller

In Mako 5.2.0, a new class was introduced that enables PostScript conversion to bypass intermediate creation of the Mako DOM during conversion of PostScript to PDF.

The route through Mako offered by the new class

The route through Mako offered by the new class

Mako’s IDistiller class is intended to fulfil the requirements currently met by PDFLib, which is no longer being actively developed.

Sample code

Jaws PDF Library is an SDK; to use it, a developer must write an application to make use of it.

A sample application, testpdflibcmd, is provided not just to show how to write code for the SDK, but to provide a practical utility that can be used to exercise the RIP’s features without the need to write code.

An equivalent application, makodistillercmd, is included in the Mako SDK and can be built for any supported platform.

While the two programs use the same arguments and options, these only apply to the conversion from PostScript to PDF which is the only conversion path offered by makodistiller. Conversion in the opoosit direction as well as conversion of PDLs in addition to PostScript and PDF is offerd by makoconverter, another sample application from the Mako SDK.

Below is an option-by-option comparison of the two applications, PDFLib's testpdflibcmd and Mako's makodistiller.


Usage

The usage is the same for both applications, although the options that may be added to an arg file are different, as described below.

testpdflibcmd <arg_file#1> [arg_file#2] ... [arg_file#N]

or

makodistillercmd <arg_file#1> [arg_file#2] ... [arg_file#N]

where <arg_file> contains the inputs to a process instance. There can be a maximum of N=16 such instances.

All instances run parallel.

Each <arg_file> can contain zero or more options given below followed by a list of folders and/or files to be run. The folders are recursively scanned for input files.

The options in <arg_file> can be zero or more of the following arguments. If you need to specify a lot of arguments, you can give one argument per line with no leading whitespace. Lines that begin with a space are treated as comments and are ignored. Ensure that the files to run are given after a set of arguments to be applied for those files.


Option Comparison

Key: n/a = Not Available.


Testpdflibcmd.exe

Makodistillercmd.exe

Description

Comments

Mode switches


-d

-d

distiller mode, convert PS files to PDF (default)



-x

n/a

xlat mode, convert PDF files to PostScript

makodistillercmd offers only PS to PDF conversion. Use makoconverter to convert PDF to any other PDL, including PostScript.


-I<filetype>

n/a

Convert mode, input file is of type <filetype> (default Auto)



For convert mode, valid filetypes are:

  • Auto - auto-detect file type (for input only)
  • PS   - PostScript
  • EPS  - Encapsulated PostScript (input with WMF/TIFF preview supported)
  • PDF - PDF file


-O<filetype>

n/a

Convert mode, output file is of type <filetype>


-U<path>

n/a

Specifies the directory where output files are written to.


Note that <path> should be terminated by a path separator (forward slash or backslash)

Distill (PDF output) mode options:


-da

n/a

ASCII encode

This option is equivalent to “CompressPages=false”, a PDF output parameter available with makoconverter


-db...

n/a

Thumbnail options (see below)

Use Mako APIs to render page images to be used as thumbnails, if required.


-dB(C|N|P)

n/a

Use the DSC BoundingBox for:

C=Crop box

N=Nothing (default)

P=Page size

makodistillercmd will always use the DSC bounding box to set both cropbox dimensions and page size to the same values.


-dc...

-dc…

Color image options (see below)



-dC

n/a

Convert device independent colors to device dependent colors

Use makoconverter for control over color. See “PDF Output Parameters” for details.


-dd<dpi>

-dd<dpi>

resolution of the whole file (default 72)



-dfb

n/a

embed the base 14 fonts

Testpdflibcmd offers extra options to control font embedding, eg.

use -dfb for the base 14 fonts

use -dfc for CID)


-dfc

n/a

embed disk-based (external) CIDFonts


-dfe

-dfe

embed fonts


-dfs

-dfs

subset fonts


-dft

n/a

substitute original TrueType fonts



-dg...

-dg...

Greyscale image options (see below)



-dh

n/a

Preserve halftones



-dI

n/a

Disable Illustrator overprint mode (requires -dv)



-dj...

n/a

Job Ticket options (see below)



-dL<logfile>

n/a

specify an explicit log file to use



-dm...

-dm...

Monochrome image options (see below)



-do

n/a

Preserve OPI

Makodistiller preserves OPI information by default


-dO

n/a

Optimize (aka linearize) the PDF file

Use makoconverter with the parameter “Linearize=true” if this is required.


-dP<format>

-dP<format>

PDF file format

For example, dP1.3 or -dP1.4


-dr

n/a

auto-rotate pages according to the predominant text direction

Off by default in Makodistiller. Add /AutoRotatePages true to a PostScript prolog to enable this feature when using MakoDistiller.


-ds...

n/a

Security options (see below)

Use Mako APIs to apply the security required as a post-processing step.


-dta

-dta

Apply transfer functions



-dtp

-dtp

Preserve transfer functions



-dtr

-dtr

Remove transfer functions



-du

 n/a

Preserve Under Colour Removal and Black Generation info

Makodistiller will preserve UCR and black generations settings by default


-dv

 n/a

Preserve overprint

Makodistiller will preserve overprint settings by default


-dz

-dz

Flate/Zip compress text



-dZ<option>

-dZ<option>

PDF1.5 (and above) object compression.

option can be None, Tags or All

·       -dZ is equivalent to -dZAll

·       No -dZ means -dZNone


-d1         

n/a


use StartDistill() rather than StartDistill2()

Not applicable to makodistiller


-d#<qty>    

number of chars to pass to PostScriptInput() per iteration; implies -d1; also writes the PostScript to stdout; useful for diagnosing PostScript errors


Distill (PDF output) mode image options


-dc*        

-dc*        

 color image options



-dg*        

-dg*        

 grayscale image options



-dm*        

-dm*        

 monochrome image options


where * is one or more of the following:


a

n/a

Average downsample

Makodistiller defaults to bicubic (most accurate downsampling algorithm) for color and grayscale, average for monochrome


b

n/a

Bicubic downsample (not monochrome)



s

n/a

Subsample downsample



A

A

Auto compression (NB: for color/grayscale only, set JPEG options with l/m/h/q switches)



f

f

Flate/Zip compression



p

p

Flate/Zip with Predictor compression



l

l

JPEG low compression (QFactor 0.1)

JPEG is for color/grayscale only.  Qfactor = quality factor


m

m

JPEG medium compression (QFactor 0.5)



h

h

JPEG high compression (QFactor 1.3)



q<QFactor>

q<QFactor>

JPEG compression using specified QFactor



c

c

CCITT compression (monochrome only)



y

n/a

Convert CMYK to RGB

Accomplish with Mako APIs.


Distill (PDF output) font options


-fp<fontPath>

-fp<fontpath>

Specifies the font directory

Must occur BEFORE -fa or -fr if they're used.


-fa<filename>

-fa<filename>

Adds the font filename so that PDFLib / MakoDistiller can use it, the filename can contain wildcards



-ff<filename>

-ff<filename>

Lists the names of the fonts that are available in the specified font file



-fr<fontname>

-fr<fontname>

removes Removes the named font from PDFLib / MakoDistiller

This switch may be repeated as necessary.


-fl

n/a

Lists the names of the fonts known to PDFlib / MakoDistiller

Fonts are listed when the switch is processed, thus -fa or -fr switches that occur after this switch won't have taken effect. Probably best to specify -fl as the LAST -f* switch you specify.


-fe<fontname>

n/a

Add the font name to the list of fonts always to embed



-fn<fontname>

n/a

Add the font name to the list of fonts never to embed



-fd

n/a

Display the always and never font embed lists