A PJL (Printer Job Language) parser for Mako.
More...
#include <pjl.h>
|
virtual IPJLParserPtr | clone ()=0 |
| Clone the parser and the PJL environment.
|
|
virtual ePjlResult | parse (const IInputPushbackStreamPtr &stream)=0 |
| Parse from the given stream, until another language is encountered or the end of the stream is reached.
|
|
virtual CPjlAttributeVect | getAttributes (const RawString &command, const RawString &key=RawString())=0 |
| Retrieves all attributes set with the given PJL command and key.
|
|
virtual void | setDefaultPaperSize (const U8String &paperSize)=0 |
| Set the default paper size in the PJL Environment. Equivalent to having parsed "@PJL SET PAPER = <papersize>" .
|
|
virtual void | setDefaultLandscape (bool defaultLandscape)=0 |
| Set the default orientation in the PJL Environment. Equivalent to having parsed "@PJL SET ORIENTATION = <PORTRAIT or LANDSCAPE>" .
|
|
virtual void | setDefaultCopies (uint32 defaultCopies)=0 |
| Set the default number of copies in the PJL Environment. Equivalent to having parsed "@PJL SET COPIES = <default copies>" .
|
|
virtual void | setDefaultDuplex (bool defaultDuplex)=0 |
| Set the default duplex in the PJL Environment. Equivalent to having parsed "@PJL SET DUPLEX = <ON or OFF>" .
|
|
virtual void | setDefaultDuplexBindingMode (eDuplexBindingMode defaultDuplexBinding)=0 |
| Set the default binding mode in the PJL Environment. Equivalent to having parsed "@PJL SET BINDING = <LONGEDGE or SHORTEDGE>" .
|
|
virtual void | setDefaultManualFeed (bool defaultManualFeed)=0 |
| Set the default manual feed mode in the PJL Environment. Equivalent to having parsed "@PJL SET MANUALFEED = <ON or OFF>" .
|
|
virtual void | addRef () const =0 |
| Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
|
|
virtual bool | decRef () const =0 |
| Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
|
|
virtual int32 | getRefCount () const =0 |
| Retrieve the current reference count of the actual object pointed to.
|
|
|
static JAWSMAKO_API IPJLParserPtr | create (const IJawsMakoPtr &jawsMako) |
| Create a PJL parser instance.
|
|
|
virtual | ~IRCObject () |
| Virtual destructor.
|
|
A PJL (Printer Job Language) parser for Mako.
◆ eDuplexBindingMode
Duplex binding mode enumeration.
Enumerator |
---|
eDBMLongEdge | Bind on long edge.
|
eDBMShortEdge | Bind on short edge.
|
◆ ePjlResult
Result code for PJL parsing.
Enumerator |
---|
ePREnterPclXl | Parse content that follows as PCL/XL.
|
ePREnterPcl | Parse content that follows as PCL5.
|
ePREnterPostScript | Parse content that follows as PostScript.
|
ePREnterPdf | Parse content that follows as PDF.
|
ePREnterHpgl2 | Parse content that follows as HPGL/2.
|
ePREndOfFile | An end of file was encountered.
|
◆ clone()
virtual IPJLParserPtr JawsMako::IPJLParser::clone |
( |
| ) |
|
|
pure virtual |
Clone the parser and the PJL environment.
- Returns
- IPJLParserPtr A new parser instance with the same environment.
◆ create()
static JAWSMAKO_API IPJLParserPtr JawsMako::IPJLParser::create |
( |
const IJawsMakoPtr & | jawsMako | ) |
|
|
static |
Create a PJL parser instance.
- Parameters
-
- Returns
- IPJLParserPtr The PJL input
◆ getAttributes()
Retrieves all attributes set with the given PJL command and key.
If the key is empty, all attributes set with the given command will be returned.
- Parameters
-
command | The PJL command to retrieve attributes for. |
key | The key to retrieve attributes for. If empty, all attributes. |
- Returns
- CPjlAttributeVect A vector of attributes for the given command and key.
◆ parse()
virtual ePjlResult JawsMako::IPJLParser::parse |
( |
const IInputPushbackStreamPtr & | stream | ) |
|
|
pure virtual |
Parse from the given stream, until another language is encountered or the end of the stream is reached.
Exceptions of type IError are thrown on error.
- Parameters
-
stream | The stream to parse. This must be a pushback-capable stream, as the parser must be able to sniff ahead. The stream must be open; the parser will neither open nor close the stream. |
- Returns
- ePjlResult The result of parsing.
◆ setDefaultCopies()
virtual void JawsMako::IPJLParser::setDefaultCopies |
( |
uint32 | defaultCopies | ) |
|
|
pure virtual |
Set the default number of copies in the PJL Environment. Equivalent to having parsed "@PJL SET COPIES = <default copies>"
.
- Parameters
-
defaultCopies | The number of copies to set. Must be greater than 0. |
◆ setDefaultDuplex()
virtual void JawsMako::IPJLParser::setDefaultDuplex |
( |
bool | defaultDuplex | ) |
|
|
pure virtual |
Set the default duplex in the PJL Environment. Equivalent to having parsed "@PJL SET DUPLEX = <ON or OFF>"
.
- Parameters
-
defaultDuplex | If true, the default duplex will be on (i.e. double-sided printing). |
◆ setDefaultDuplexBindingMode()
virtual void JawsMako::IPJLParser::setDefaultDuplexBindingMode |
( |
eDuplexBindingMode | defaultDuplexBinding | ) |
|
|
pure virtual |
Set the default binding mode in the PJL Environment. Equivalent to having parsed "@PJL SET BINDING = <LONGEDGE or SHORTEDGE>"
.
- Parameters
-
defaultDuplexBinding | The duplex binding mode to set. |
◆ setDefaultLandscape()
virtual void JawsMako::IPJLParser::setDefaultLandscape |
( |
bool | defaultLandscape | ) |
|
|
pure virtual |
Set the default orientation in the PJL Environment. Equivalent to having parsed "@PJL SET ORIENTATION = <PORTRAIT or LANDSCAPE>"
.
- Parameters
-
defaultLandscape | If true, the default orientation will be landscape. |
◆ setDefaultManualFeed()
virtual void JawsMako::IPJLParser::setDefaultManualFeed |
( |
bool | defaultManualFeed | ) |
|
|
pure virtual |
Set the default manual feed mode in the PJL Environment. Equivalent to having parsed "@PJL SET MANUALFEED = <ON or OFF>"
.
- Parameters
-
defaultManualFeed | If true, the default manual feed will be on. |
◆ setDefaultPaperSize()
virtual void JawsMako::IPJLParser::setDefaultPaperSize |
( |
const U8String & | paperSize | ) |
|
|
pure virtual |
Set the default paper size in the PJL Environment. Equivalent to having parsed "@PJL SET PAPER = <papersize>"
.
- Parameters
-
paperSize | The paper size to set, e.g., "A4", "Letter", etc. |
The documentation for this class was generated from the following file: