pdf2json
Version:
PDF file parser that converts PDF binaries to JSON and text, powered by porting a fork of PDF.JS to Node.js
114 lines (112 loc) • 3.61 kB
JavaScript
export const kColors = [
'#000000', // 0
'#ffffff', // 1
'#4c4c4c', // 2
'#808080', // 3
'#999999', // 4
'#c0c0c0', // 5
'#cccccc', // 6
'#e5e5e5', // 7
'#f2f2f2', // 8
'#008000', // 9
'#00ff00', // 10
'#bfffa0', // 11
'#ffd629', // 12
'#ff99cc', // 13
'#004080', // 14
'#9fc0e1', // 15
'#5580ff', // 16
'#a9c9fa', // 17
'#ff0080', // 18
'#800080', // 19
'#ffbfff', // 20
'#e45b21', // 21
'#ffbfaa', // 22
'#008080', // 23
'#ff0000', // 24
'#fdc59f', // 25
'#808000', // 26
'#bfbf00', // 27
'#824100', // 28
'#007256', // 29
'#008000', // 30
'#000080', // Last + 1
'#008080', // Last + 2
'#800080', // Last + 3
'#ff0000', // Last + 4
'#0000ff', // Last + 5
'#008000' // Last + 6
];
export const kFontFaces = [
"quicktype,arial,helvetica,sans-serif", // 00 - QuickType - sans-serif variable font
"quicktype condensed,arial narrow,arial,helvetica,sans-serif", // 01 - QuickType Condensed - thin sans-serif variable font
"quicktypepi,quicktypeiipi", // 02 - QuickType Pi
"quicktype mono,courier new,courier,monospace", // 03 - QuickType Mono - san-serif fixed font
"ocr-a,courier new,courier,monospace", // 04 - OCR-A - OCR readable san-serif fixed font
"ocr b mt,courier new,courier,monospace" // 05 - OCR-B MT - OCR readable san-serif fixed font
];
export const kFontStyles = [
// Face Size Bold Italic StyleID(Comment)
// ----- ---- ---- ----- -----------------
[], //00
[], //01
[], //02
[], //03
[], //04
[], //05
[], //06
[], //07
[], //08
[], //09
[], //10
[], //11
[], //12
[], //13
[], //14
[], //15
[], //16
[], //17
[], //18
[], //19
[], //20
[], //21
[], //22
[], //23
[], //24
[], //25
[], //26
[], //27
[], //28
[], //29
[], //30
[], //31
[], //32
[], //33
[], //34
[], //35
[], //36
[], //37
[], //38
[], //39
[], //40
[], //41
[], //42
[], //43
[], //44
[], //45
[], //46
[], //47
[], //48
[], //49
[], //50
[], //51
[], //52
[], //53
[], //54
[], //55
[], //56
[], //57
[], //58
[], //59
[] //60
];