-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
2045 lines (1685 loc) · 49.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference types="node" />
export const CONVERSION = 0.0028346456693
export type NPDFExternal<T> = Object
export type Callback<T> = (err: Error, data: T) => void
export function pdfDate(d: Date): string
export enum NPDFOutlineFormat {
Default = 0,
Italic,
Bold,
BoldItalic,
Unknown = 0xFF
}
export interface NPDFFontMetrics {
lineSpacing: number
underlineThickness: number
underlinePosition: number
strikeOutThickness: number
strikeOutPosition: number
fileName: string
fontData: string
fontWeight: number
fontSize: number
fontScale: number
charSpace: number
wordSpace: number
fontType?: string
}
export type NPDFcmyk = [number, number, number, number]
export type NPDFrgb = [number, number, number]
export type NPDFGrayScale = number
export type NPDFPoint = { x: number, y: number }
export enum NPDFStokeStyle {
Solid,
Dash,
Dot,
DashDot,
DashDotDot
}
export enum NPDFHighlightingMode {
None,
Invert,
InvertOutline,
Push,
Unknown = 0xff
}
export enum NPDFFontType {
TrueType,
Type1Pfa,
Type1Pfb,
Type1Base14,
Type3
}
export enum NPDFColorSpace {
DeviceGray,
DeviceRGB,
DeviceCMYK,
Separation,
CieLab,
Indexed
}
export enum NPDFTextRenderingMode {
Fill,
Stroke,
FillAndStroke,
Invisible,
FillToClipPath,
StrokeToClipPath,
FillAndStrokeToClipPath,
ToClipPath
}
export enum NPDFLineCapStyle {
Butt,
Round,
Square
}
export enum NPDFLineJoinStyle {
Miter,
Round,
Bevel
}
/**
* Top - Align with the top of the containing Rect
* Center - Aligns Center, uses the set font's font metrics for calculating center
* Bottom - Aligns with the bottom of the containing Rect
*/
export enum NPDFVerticalAlignment {
Top,
Center,
Bottom
}
/**
* Left - Does nothing, this is the default behaviour
* Center - Calculates center using font's font metrics stringWidth operation ( / 2)
* Right - Calculates center using font's font metrics stringWidth operation
*/
export enum NPDFAlignment {
Left,
Center,
Right
}
export type NPDFDictionaryKeyType = 'boolean' | 'long' | 'name' | 'real'
export type NPDFInternal = any
export type NPDFCoerceKeyType = 'boolean' | 'long' | 'name' | 'real'
export type NPDFDataType = 'Boolean' | 'Number' | 'Name' | 'Real' | 'String' | 'Array' |
'Dictionary' | 'Reference' | 'RawData'
export enum NPDFSigFlags {
SignatureExists = 1,
AppendOnly = 2,
SignatureExistsAppendOnly = 3
}
export enum NPDFImageFormat {
data,
png,
tiff,
jpeg,
}
export enum NPDFFontEncoding {
WinAnsi = 1,
Standard = 2,
PdfDoc = 3,
MacRoman = 4,
MacExpert = 5,
Symbol = 6,
ZapfDingbats = 7,
Win1250 = 8,
Iso88592 = 9,
Identity = 0
}
export enum NPDFPageMode {
DontCare,
UseNone,
UseThumbs,
UseBookmarks,
FullScreen,
UseOC,
UseAttachments
}
export enum NPDFPageLayout {
Ignore,
Default,
SinglePage,
OneColumn,
TwoColumnLeft,
TwoColumnRight,
TwoPageLeft,
TwoPageRight
}
export interface NPDFCreateFontOpts {
fontName: string,
bold?: boolean,
italic?: boolean,
encoding?: NPDFFontEncoding,
embed?: boolean,
fileName?: string
}
export enum NPDFAnnotationAppearance {
normal,
rollover,
down
}
export type ListItem = {
value: string,
display: string
}
export interface NPDFTextFieldOpts {
maxLen?: number
multiLine?: boolean
passwordField?: boolean
fileField?: boolean
spellCheckEnabled?: boolean
scrollEnabled?: boolean
/**
* @desc Divide text into equal length combs.
* @requires NPDFTextFieldOpts#maxLen
*/
combs?: boolean
richText?: boolean
}
export enum NPDFCertificatePermission {
NoPerms = 1,
FormFill = 2,
Annotations = 3,
}
export enum NPDFFieldType {
PushButton,
Checkbox,
RadioButton,
TextField,
ComboBox,
ListBox,
Signature,
Unknown = 0xff
}
export type NPDFAnnotationBorderStyle = { horizontal: number, vertical: number, width: number }
export type ProtectionOption =
'Copy'
| 'Print'
| 'Edit'
| 'EditNotes'
| 'FillAndSign'
| 'Accessible'
| 'DocAssembly'
| 'HighPrint'
export type EncryptOption = {
userPassword?: string
ownerPassword?: string
protection?: Array<ProtectionOption>
algorithm?: 'rc4v1' | 'rc4v2' | 'aesv2' | 'aesv3'
keyLength?: number
}
export type ProtectionSummary = {
Accessible: boolean
Print: boolean
Copy: boolean
DocAssembly: boolean
Edit: boolean
EditNotes: boolean
FillAndSign: boolean
HighPrint: boolean
}
export enum NPDFDestinationType {
XYZ,
Fit,
FitH,
FitV,
FitR,
FitB,
FitBH,
FitBV,
Unknown = 0xFF
}
export enum NPDFDestinationFit {
Fit,
FitH,
FitV,
FitB,
FitBH,
FitBV,
Unknown = 0xFF
}
export enum NPDFAnnotation {
Text = 0,
Link,
FreeText,
Line,
Square,
Circle,
Polygon,
PolyLine,
Highlight,
Underline,
Squiggly,
StrikeOut,
Stamp,
Caret,
Ink,
Popup,
//FileAttachement, // To create a file attachment use Document.attachFile() method
Sound = 17,
Movie,
Widget,
Screen,
PrinterMark,
TrapNet,
Watermark,
_3D,
RichMedia,
WebMedia,
}
export enum NPDFAnnotationFlag {
Invisible = 0x0001,
Hidden = 0x0002,
Print = 0x0004,
NoZoom = 0x0008,
NoRotate = 0x0010,
NoView = 0x0020,
ReadOnly = 0x0040,
Locked = 0x0080,
ToggleNoView = 0x0100,
LockedContents = 0x0200
}
export enum NPDFAnnotationType {
Text = 'Text',
Link = 'Link',
FreeText = 'FreeText',
Line = 'Line',
Square = 'Square',
Circle = 'Circle',
Polygon = 'Polygon',
PolyLine = 'PolyLine',
Highlight = 'Highlight',
Underline = 'Underline',
Squiggly = 'Squiggly',
StrikeOut = 'StrikeOut',
Stamp = 'Stamp',
Caret = 'Caret',
Ink = 'Ink',
Popup = 'Popup',
FileAttachment = 'FileAttachment',
Sound = 'Sound',
Movie = 'Movie',
Widget = 'Widget',
Screen = 'Screen',
PrinterMark = 'PrinterMark',
TrapNet = 'TrapNet',
Watermark = 'Watermark',
_3D = '3D',
RichMedia = 'RichMedia',
WebMedia = 'WebMedia'
}
export interface NPDFInfo {
author: string
createdAt: Date
creator: string
keywords: string
producer: string
subject: string
title: string
}
export enum NPDFVersion {
Pdf11,
Pdf12,
Pdf13,
Pdf14,
Pdf15,
Pdf16,
Pdf17,
}
export enum NPDFWriteMode {
Default = 0x01,
Compact = 0x02
}
export enum NPDFActions {
GoTo = 0,
GoToR,
GoToE,
Launch,
Thread,
URI,
Sound,
Movie,
Hide,
Named,
SubmitForm,
ResetForm,
ImportData,
JavaScript,
SetOCGState,
Rendition,
Trans,
GoTo3DView,
RichMediaExecute,
Unknown = 0xff
}
export enum NPDFMouseEvent {
up,
down,
enter,
exit
}
export enum NPDFPageEvent {
open,
close,
visible,
invisible
}
export enum NPDFBlendMode {
Normal = "Normal",
Multiply = "Multiply",
Screen = "Screen",
Overlay = "Overlay",
Darken = "Darken",
Lighten = "Lighten",
ColorDodge = "ColorDodge",
ColorBurn = "ColorBurn",
HardLight = "HardLight",
SoftLight = "SoftLight",
Difference = "Difference",
Exclusion = "Exclusion",
Hue = "Hue",
Saturation = "Saturation",
Color = "Color",
Luminosity = "Luminosity"
}
export enum NPDFRenderingIntent {
AbsoluteColorimetric = "AbsoluteColorimetric",
RelativeColorimetric = "RelativeColorimetric",
Perceptual = "Perceptual",
Saturation = "Saturation"
}
export namespace nopodofo {
export class Configure {
enableDebugLogging: boolean
/**
* @desc Set the logging file destination, ex: /tmp/foo/bar.txt
* @param output
*/
logFile(output: string): void
}
/**
* An Action can be used in conjunction with an outline to create bookmarks on the pdf
* Action can also used to link annotatoins to external sources, as well as run scripts.
* @see Outline
* @see Annotation
*/
export class Action {
constructor(doc: Base, type: NPDFActions)
readonly type: NPDFActions
uri?: string
script?: string
getObject(): nopodofo.Object
addToDictionary(dictionary: Dictionary): void
}
/**
* Annotations are the core of all pdf widgets, this includes AcroForm fields, sticky notes, links, etc...
* An Annotation is created via document page.createAnnotation. There is no other way to create a new annotation.
* Annotations are a lower level PDF object, please familiarize yourself with the PDF Spec for usage.
* {@link https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf}
* @see Page
*/
export class Annotation {
flags: NPDFAnnotationFlag
title: string
content: string
destination: Destination
action: Action
open: boolean
quadPoints: number[]
color: Color
attachment: FileSpec
rect: Rect
setBorderStyle(v: { horizontal: number, vertical: number, width: number }, stroke?: nopodofo.Array): void
hasAppearanceStream(): boolean
setAppearanceStream(xobj: XObject): void
getType(): NPDFAnnotationType
}
export class Data {
constructor(value: string | Buffer)
readonly value: string
write(output: string): void
}
/**
* The PdfDate object is a specific format for Date objects in Pdf
*/
export class Date {
/**
* Create a new PdfDate object with a timestamp of now
* @returns {Date}
*/
constructor()
/**
* Create an existing timestamp from a string.
* The string must be formatted in the following:
* (D:YYYYMMDDHHmmSSOHH'mm')
* @param {string} timestamp
* @returns {Date}
*/
constructor(timestamp: string)
/**
* returns in the the following format: (D:YYYYMMDDHHmmSSOHH'mm')
* @returns {string}
*/
toString(): string
}
export class Destination {
constructor(page: Page, fit: NPDFDestinationFit)
constructor(page: Page, fit: nopodofo.Rect)
constructor(page: Page, fit: NPDFDestinationFit, fitArg: number)
constructor(page: Page, left: number, top: number, zoom: number)
readonly page: Page
readonly type: NPDFDestinationType
}
export class Encrypt {
static createEncrypt(opts: EncryptOption): NPDFExternal<Encrypt>
constructor(doc: Document)
owner: string
user: string
encryptionKey: string
keyLength: number
protections: ProtectionSummary
isAllowed(action: ProtectionOption): boolean
}
abstract class Field {
readOnly: boolean
required: boolean
fieldName: string
alternateName?: string
mappingName?: string
exported: boolean
AP?: Dictionary
DA?: string | null
readonly widgetAnnotation: Annotation
readonly type: NPDFFieldType
readonly obj: nopodofo.Object
setBackgroundColor(color: Color): void
setBorderColor(color: Color): void
setHighlightingMode(mode: NPDFHighlightingMode): void
setMouseAction(on: NPDFMouseEvent, action: Action): void
setDate(dateTime?: string | nopodofo.Date): void
setPageAction(on: NPDFPageEvent, action: Action): void
}
export class Color {
constructor()
constructor(grey: number)
constructor(fromString: string)
constructor(red: number, green: number, blue: number)
constructor(cyan: number, magenta: number, yellow: number, black: number)
/**
* Get the stream representation of this color
*/
getColorStreamString(): string
isRGB(): boolean
isCMYK(): boolean
isGreyScale(): boolean
convertToGreyScale(): Color
convertToCMYK(): Color
convertToRGB(): Color
getGrey(): number
getRed(): number
getGreen(): number
getBlue(): number
getCyan(): number
getMagenta(): number
getYellow(): number
getBlack(): number
}
export class TextField extends Field {
/**
* @desc Create from an existing Field
*/
constructor(page: Page, fieldIndex: number)
/**
* @desc Creates a new TextField
*/
constructor(page: Page, annotation: Annotation, form: Form, opts?: Object)
text: string
maxLen: number
multiLine: boolean
passwordField: boolean
fileField: boolean
spellCheckEnabled: boolean
scrollEnabled: boolean
combs: boolean
richText: boolean
refreshAppearanceStream(): void
}
export class Checkbox extends Field {
/**
* @desc Create from an existing Field
*/
constructor(page: Page, fieldIndex: number)
/**
* @desc Creates a new TextField
*/
constructor(form: Form, annotation: Annotation)
checked: boolean
}
abstract class ListField extends Field {
selected: number
length: number
spellCheckEnabled: boolean
sorted: boolean
multiSelect: boolean
isComboBox(): boolean
insertItem(value: string, displayName: string): void
removeItem(index: number): void
getItem(index: number): ListItem
}
export class ComboBox extends ListField {
/**
* @desc Create from an existing Field
*/
constructor(page: Page, fieldIndex: number)
/**
* @desc Creates a new TextField
*/
constructor(form: Form, annotation: Annotation)
editable: boolean
}
export class ListBox extends ListField {
/**
* @desc Create from an existing Field
*/
constructor(page: Page, fieldIndex: number)
/**
* @desc Creates a new TextField
*/
constructor(form: Form, annotation: Annotation)
}
export class PushButton extends Field {
/**
* @desc Create from an existing Field
*/
constructor(page: Page, fieldIndex: number)
/**
* @desc Creates a new TextField
*/
constructor(form: Form, annotation: Annotation)
rollover: string
rolloverAlternate: string
}
export class SignatureField {
readonly widgetAnnotation: Annotation
readonly obj: Object
readonly info: { byteRange: number[], signature: string }
constructor(annotation: Annotation, doc: Document)
setAppearanceStream(xObj: any, appearance: NPDFAnnotationAppearance, name: string): void
setReason(reason: string): void
setLocation(location: string): void
setCreator(creator: string): void
setDate(dateTime?: string): void
addCertificateReference(perm: NPDFCertificatePermission): void
setFieldName(name: string): void
getSignatureObject(): Object
ensureSignatureObject(): void
}
export class FileSpec {
/**
* Create a new FileSpec object
* @param file
* @param doc
* @param embed
*/
constructor(file: string, doc: Base, embed?: boolean)
/**
* Copy an existing FileSpec from an Obj
*/
constructor(obj: Object)
readonly name: string
/**
* @desc Can only get the file if it has been embedded into the document.
* @returns {Buffer | undefined}
*/
getContents(): Buffer | undefined
}
export class Form {
needAppearances: boolean
dictionary: Dictionary
DA?: string
DR?: Dictionary
CO?: Dictionary
SigFlags?: NPDFSigFlags
// createAppearanceStream<T extends Field>(bg: Color, fg: Color, font: Font, size: number)
}
export class Image {
/**
*
* @param {Base} doc
* @param {string | Buffer} source
* @param {NPDFImageFormat} [format] - defaults to data
* @returns {Image}
*/
constructor(doc: Base, source: string | Buffer, format?: NPDFImageFormat)
readonly width: number
readonly height: number
setICCProfile(input: Buffer, colorComponent: number, alt: NPDFColorSpace): void
setSoftMask(img: Image): void
setChromaKeyMask(r: number, g: number, b: number, threshold: number): void
setColorSpace(colorSpace: NPDFColorSpace): void
setInterpolate(v: boolean): void
}
/**
* @desc Document represents a PdfMemDocument, construct from an existing pdf document.
* Document is the core class for reading and manipulating PDF files and writing them back to disk.
* Document was designed to allow easy access to the object structure of a PDF file.
* Document should be used whenever you want to change the object structure of a PDF file.
*/
export class Document extends Base {
constructor()
encrypt: Encrypt
readonly trailer: Object
catalog: Object
load(file: string | Buffer,
opts: {
forUpdate?: boolean,
password?: string
},
cb: Callback<void>): void
load(file: string | Buffer, cb: Callback<Document>): void
setPassword(pwd: string): void
/**
* Find a font in the Documents font cache by name or id
* @param name
*/
getFont(name: string): Font
/**
* Get a list of font {name, id} from the current document
*/
listFonts(): { name: string, id: string, file: string }[]
/**
* Deletes one or more pages from the document by removing the pages reference
* from the pages tree. This does NOT remove the page object as the page object
* may be used by other objects in the document.
* @param startIndex - first page to delete (0-based)
* @param count - number of pages to delete
*/
splicePages(startIndex: number, count: number): void
/**
* Copies one or more pages from another pdf to this document
* This function copies the entire document to the target document and then
* deletes pages that are not of interest. This is a much faster process, but
* without object garbage collection the document may result in a much larger
* than necessary document
* @see {Document#gc}
* @param fromDoc - PdfMemDocument to append
* @param startIndex - first page to copy (0-based)
* @param count - number of pages to copy
*/
insertPages(fromDoc: Document, startIndex: number, count: number): number
/**
* Persist the document with any changes applied to either a new nodejs buffer or to disk.
* @param destination - file path or callback function
* @param cb - if file path was provided as destination, this must be a callback function
*/
write(destination: Callback<Buffer> | string, cb?: Callback<string>): void
/**
* Performs garbage collection on the document. All objects not
* reachable by the trailer are deleted.
* @param file - pdf document, file path or node buffer
* @param pwd - if document is password protected this parameter is required
* @param cb - function
*/
static gc(file: Buffer, pwd: string, cb: Callback<Buffer>): void
static gc(file: Buffer, cb: Callback<Buffer>): void
/**
* Check for the existence of a signature field(s)
* @returns {boolean}
*/
hasSignatures(): boolean
/**
* Iterate each page annotations array for an annotation of type signature.
* @returns {SignatureField[]}
*/
getSignatures(): SignatureField[]
append(doc: Document | Document[]): void
insertExistingPage(memDoc: Document, index: number, insertIndex: number): number
}
abstract class Base {
readonly form: Form
readonly body: Object[]
readonly version: NPDFVersion
pageMode: NPDFPageMode
pageLayout: NPDFPageLayout
printingScale: string
baseUri: string
language: string
readonly info: NPDFInfo
getPageCount(): number
getPage(n: number): Page
hideToolbar(): void
hideMenubar(): void
hideWindowUI(): void
fitWindow(): void
centerWindow(): void
displayDocTitle(): void
useFullScreen(): void
attachFile(file: string): void
insertPage(rect: Rect, index: number): Page
isLinearized(): boolean
getWriteMode(): NPDFWriteMode
isAllowed(perm: ProtectionOption): boolean
createFont(opts: NPDFCreateFontOpts): Font
createFontSubset(opts: NPDFCreateFontOpts): Font
/**
* Get an existing outline or create a new outline and new root node
* @param {boolean} [create] - Create a new outline if one does not already exist
* @param {string} [root] - Create a Root node with the provided name
*/
getOutlines(create?: boolean, root?: string): null | Outline
getObject(ref: Ref): Object
getNames(create: boolean): Object | null
createXObject(rect: Rect): XObject
createPage(rect: Rect): Page
createPages(rects: Rect[]): number
getAttachment(fileName: string): FileSpec
addNamedDestination(page: Page, destination: NPDFDestinationFit, name: string): void
}
export class Object {
readonly reference: Ref
readonly length: number
readonly stream: Stream
readonly type: NPDFDataType
immutable: boolean
constructor()
constructor(s: string)
constructor(a: string[] | number[])
constructor(d: number)
hasStream(): boolean
getOffset(key: string, cb: Callback<number>): void
write(output: string, cb: Callback<string>): void
flateCompressStream(): void
delayedStreamLoad(): void
getBool(): boolean
getDictionary(): Dictionary
getString(): string
getName(): string
getReal(): number
getNumber(): number
getArray(): Array
/**
* Copies the raw data to a nodejs buffer.
*/
getRawData(): Buffer
clear(): void