Streamline Direct
Introduction
Streamline Direct is an application to pre-process PDFs destined to be ripped by Harlequin with the aim of improving RIP throughput by optimizing images, fonts, and reusable page components.
Streamline Direct can also be used to streamline "problem" PDFs to achieve the same output quality while maximizing your device speed. If you require non-PDF formats, you can adapt Streamline Direct to convert many formats to print-ready PDFs.
Streamline Direct is a stand-alone, command-line application whose behavior is controlled by a configuration file in JSON format. This approach simplifies integrating Streamline Direct into a print workflow.
Streamline Direct is built with Mako Core.
Usage
Run StreamlineDirect.exe on the command line to find the most up-to-date usage.
The current version yields:
StreamlineDirect 1.1.1.56 (Mako V6.1.1) Copyright (c) 2021 Global Graphics Software Ltd. All rights reserved. Usage: StreamlineDirect.exe /features Returns a list of processing features supported by the command line. StreamlineDirect.exe <configuration file> <input pdf file> <output folder> [/markup] [/report <report text file>] Processes the input pdf/ijpds file, writing the output with the same filename (with a PDF extension) to an output folder, where: /markup: Adds the processed content to a new layer.
Configuration file
The configuration file describes how Streamline Direct runs. It determines:
- The features used for processing.
- The configuration of the target printer.
- The configuration of Mako.
An example configuration follows:
Configuration example
{
"configuration" : {
"enableFontSubsetting" : false,
"maxAccumulatedPages" : 0
},
"printer" : {
"dpi" : 900
},
"features" : {
"image-downsampler" : true,
"image-vectorizer" : true,
"transparency-flattener" : true
},
"flattener" : {
"usethreads" : false,
"resolution" : 600,
"vectormodeenabled" : true,
"vectorandtextresolution" : 1200,
"rasterfallbackthreshold" : 100,
"targetspace" : "USWebCoatedSWOP.icc",
"monochromemode" : false,
"hasthresholdhalftone" : false,
"trigger" : 1
},
"ijpds" : {
"ripsetup" : "cmyk",
"riporder" : "0,1,3,2",
"riprotate" : "180",
"resourcedirectory" : ""
}
}
Configuration
The configuration section contains settings that affect how Mako processes the document.
Setting | Optional | Description |
---|---|---|
enableFontSubsetting | Yes | Enabling font subsetting indicates that Mako should subset fonts when serializing pages to disk. This may result in unused characters in an original embedded font being dropped from the output PDF. Enabling increases the time to serialize pages. Defaults to true if not specified. |
maxAccumulatedPages | Yes | The maximum number of pages that are retained when serializing before. The pages are processed (font merging) and serialized to disk. Setting to 0 instructs Mako to serialize each page to disk individually, which means that font merging does not occur. Defaults to 0 if not specified. |
defaultCmykProfilePath | Yes | Path to an ICC profile to be used as the CMYK target colorspace. |
defaultRgbProfilePath | Yes | Path to an ICC profile to be used as the RGB target colorspace. |
defaultGrayProfilePath | Yes | Path to an ICC profile to be used as the Gray target colorspace. |
targetColorSpace | Yes | Specifies the target colorspace. Choose from CMYK (default), RGB, or Gray. |
downsamplingThreshold | Yes | Set a blanket threshold resolution (dpi) for downsampling all images. Only images with an effective resolution of at least this value are downsampled. |
contoneDownsamplingMethod | Yes | Set the desired downsampling method for gray images. Choose from Bicubic (default) or Subsample. |
monoDownsamplingMethod | Yes | Set the desired downsampling method for monochrome images. Choose from Subsample (default) or Bicubic. |
naturalImageResolution | Yes | Set the target resolution for "natural" images. Defaults to the value specified for the target DPI of the printer. |
useLossyCompressionForDownsampledNatural | Yes | Determines if images are compressed with DCT (JPEG) or flate (Zip) compression. Choose from true or false (default). |
useLossyCompressionForColorConvertedNatural | Yes | Determines if images are compressed with DCT (JPEG) or flate (Zip) compression. Choose from true or false (default). |
jpegQuality | Yes | DCT (JPEG) image quality. This is expressed as an integer between 1 (lowest quality) and 5 (highest quality). The default is 5 . |
defaultBlackPointCompensation | Yes | May be set to one of three values:
These settings are interpreted as follows:
|
psConfigFilename | Yes | Specifies the filename for a PostScript configuration file for Harlequin Core. Defaults to "hhrConfig.ps" |
Printer
The printer section contains settings that describe the target printer.
Setting | Optional | Description |
---|---|---|
dpi | No | The target DPI of the printer. This setting determines the downsampling applied in the "image-downsampler" feature. Defaults to 900dpi. |
Features
The features section is a list of features to be used, with a boolean to determine whether the feature is active or not.
"features" : {
"image-downsampler" : true,
"image-vectorizer" : true,
"image-scan-direction-corrector" : true,
"color-converter" : true,
"transparency-flattener" : true
}
The order of the features determines the order in which they are applied to the target document.
Use the /features
flag to find a full list of features supported by Streamline:
Feature | Description |
---|---|
image-downsampler | Images are downsampled to the target DPI specified in the printer settings. |
image-vectorizer | Turns supported images into vectorized paths. Only supports images with a single channel and 1bpp. |
image-scan-direction-corrector | Ensures image samples are presented in an optimal order. |
color-converter | Pre-converts colors to the fullest extent possible. |
transparency-flattener | Flattening is the process of simplifying transparent artwork so that it can be more easily consumed by the a RIP, in some cases significantly improving throughput. See 'Transparency Flattening' below. |
Transparency flattening
For a RIP to produce output in the form of a raster, it must calculate the color of every pixel. For objects subject to transparency (that is, those with an opacity of less than 100%) the pixels that make up that object will interact with others that it overlaps, meaning the RIP must perform calculations to determine what the effective color will be. This can be a time-consuming process, and could slow the effective throughput and in direct-to-print scenarios, hold up the press.
Flattening is the process of reducing this complexity by rendering those page regions affected by transparency, replacing them with a pre-rendered raster. Streamline Direct makes use of a Mako custom transform that is designed for this purpose (IRendererTransform
), and offers controls over how it it is applied. The table below lists the options. Add a section to the JSON configuration in this format:
"flattener" : {
"usethreads" : false,
"resolution" : 600,
"vectormodeenabled" : true,
"vectorandtextresolution" : 1200,
"rasterfallbackthreshold" : 100,
"targetspace" : "DeviceRGB",
"targetprofile" : "USWebCoatedSWOP.icc",
"monochromemode" : false,
"hasthresholdhalftone" : false,
"trigger" : 1
}
Parameter | Possible values | Description |
---|---|---|
usethreads | true | Use multiple threads to process page regions concurrently |
false | Default. Use a single thread for processing | |
resolution | 96-4096 | Sets the resolution, in dots-per-inch, at which to regions requiring it are rendered. Default is 96 dpi. |
vectormodeenabled | true | Generate a vector path to use as an image mask. This gives a smooth edge even then the content is rendered at a low resolution. |
false | Generate a bitmap mask, which may lead to a "stair-step" effect for an object for a given size and resolution. | |
vectorandtextresolution | 96-2400 | Sets the resolution, in DPI, at which geometry is processed. It controls the precision by which curves are converted to straight lines, and how precisely strokes are handled. Default is 1200 dpi. |
rasterfallbackthreshold | 0-1024 | The process of vector flattening requires regions to be broken up into smaller objects, but there is a point at which the added complexity will be counter-productive. This value specifies the number of objects, per square inch, that if exceeded will trigger the flattener to generate a raster instead. Default is 100. |
targetspace | DeviceRGB | Sets the target final color space for rendered content. The default is
|
DeviceCMYK | ||
SWOP | ||
targetprofile | <ICC color space> | File path to a target color space. Sets the target final color space for rendered content, overriding the value set by targetspace (except for |
monochromemode | true | Use monochrome output. |
false | Do not use monochrome output. | |
hasthresholdhalftone | true | Currently unused |
false | ||
trigger | 0 | Process all pages |
1 | Apply transparency flattening only in the presence of a shaded brush (typically, a linear or radial gradient) |
IJPDS
Several input parameters are available to control how Inkjet Printer Data Stream (IJPDS) job content is assembled into the PDF. These collation options are needed because IJPDS job files are input to KODAK VERSAMARK printing systems, and therefore essentially a sequence of bitmap pages, the order of which is arbitrary and determined at file creation. For example, each may be separate monochrome pages or a color separation for a page. Although pages are assigned to a logical RIP (raster image processor) for physical printing, IJPDS doesn't directly specify how the different RIPs are to be interpreted. During testing, we encountered:
- A job with eight RIPs, which should be interpreted as CMYK separations for the front and back of a (duplex) page
- A job with eight RIPs that are all individual mono pages
The collator works by treating all pages assigned the same logical RIP in the same way. The table below lists the options. Add a section to the JSON configuration in this format:
"ijpds" : {
"ripsetup" : "cmyk",
"riporder" : "ordinal",
"collation" : "bypage",
"resourcedirectory" : ""
}
Parameter | Possible values | Description |
---|---|---|
ripsetup |
| Default. Each RIP generates its own page. |
cmyk | Groups RIPs together in blocks of four to generate a composite page. | |
riporder | fromjob | RIPs are arranged in the order the job defines them. Default. |
ordinal | RIPs are arranged sequentially in their ordinal numbering (starting from | |
0,1,2,3 … | A comma-separated sequence of RIP IDs (a number from | |
0,1,3,2 | Example: For CMYK output it is sometimes necessary to change the plate order (here | |
-1,2,-1,-1 | Example: If | |
collation |
| Default. Output is ordered in page number major order. All the first pages from each RIP are output followed by the second pages, and so on. |
byrip | Output is ordered by RIP major order. All the pages for RIP 1 are output followed by all the pages for RIP 2, and so on. | |
riprotate |
| This denotes the rotation of a RIP separation in the output page. The value is an angle in degrees, counter-clockwise. Possible values are |
90 | ||
180 | ||
270 | ||
stitch | true (or 1 ) | Individual RIP separations are combined into one page by stitching them together. Default. The orientation of the stitching can be controlled by the |
false (or 0 ) | Individual RIP separations are each output as separate pages. | |
stitchhorizontal | true (or 1 ) | The RIP separations are stitched in a horizontal orientation. |
false (or 0 ) | The RIP separations are stitched in a vertical orientation. Default. | |
resourcedirectory | <path to resources folder> | Sets the directory where remote resources are located (that is, resources referenced by the IJPDS but external to it). |