📌 Overview
This page describes a feature introduced in Mako 8.4.0 that makes it easier to configure IPSInput/IPRNInput.
This came about as a customer was attempting to generate rotated output for a couple of PostScript jobs using IPRNInput. The first used a %%ViewingOrientation DSC comment that indicated the desired rotation. The second lacked this comment, but could be auto rotated based on the dominant text direction in the job.
ℹ️ Key Concepts
-
The Jaws PostScript interpreter built into Mako will rotate a page based on DSC comments or dominant text orientation providing the
/AutoRotatePageskey is set -
Until Mako 8.4.0, only the
IDistiller(direct PostScript to PDF conversion) provided a means to apply this setting -
A class introduced in Mako 8.4.0,
IPRNInputPDLConfiguratorallows users to configure the underlying PDL forIPSInputandIPRNInput
💪 Usage
Basic Usage
This code example shows how to configure IPRNInput to auto-rotate pages.
⌨️ Using IPRNInputPDLConfigurator
1. Add this class to create an instance
class CPdlConfigurator : public IPRNInputPDLConfigurator
{
public:
CPdlConfigurator(const bool autoRotatePages)
{
m_autoRotatePages = autoRotatePages;
}
void configure(const IInputPtr &input) override
{
IPSInputPtr psInput = obj2IPSInput(input);
if (psInput)
{
IDistillerPtr distiller = psInput->getDistiller();
distiller->setAutoRotatePages(m_autoRotatePages);
}
}
private:
bool m_autoRotatePages;
};
2. Usage
bool autoRotatePages = true;
CPdlConfigurator configurator(autoRotatePages);
PRNInputPtr prnInput = IPRNInput::create(jawsMako);
prnInput->setPdlConfigurator(&configurator);