Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Comment for knownCommands

  • Loading branch information...
commit 874357aac1762f111192c212452ba43bc9d0ee70 1 parent 43f1946
@yurydelendik yurydelendik authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/parser.js
7 src/parser.js
@@ -266,6 +266,13 @@ var Parser = (function ParserClosure() {
var Lexer = (function LexerClosure() {
function Lexer(stream, knownCommands) { = stream;
+ // The PDFs might have "glued" commands with other commands, operands or
+ // literals, e.g. "q1". The knownCommands is a dictionary of the valid
+ // commands and their prefixes. The prefixes are built the following way:
+ // if there a command that is a prefix of the other valid command or
+ // literal (e.g. 'f' and 'false') the following prefixes must be included,
+ // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
+ // other commands or literals as a prefix. The knowCommands is optional.
this.knownCommands = knownCommands;
Please sign in to comment.
Something went wrong with that request. Please try again.