Follow link for typedef. Font Metrics interface.
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
}
type NPDFcmyk = [number, number, number, number]
type NPDFrgb = [number, number, number]
type NPDFGrayScale = number
Values must be between 0.0 and 1.0 type NPDFColor = NPDFrgb | NPDFcmyk | NPDFGrayScale
type NPDFPoint = { x: number, y: number }
Stroke style enum. Follow link for typedef.
enum NPDFStokeStyle {
Solid,
Dash,
Dot,
DashDot,
DashDotDot
}
Highlight modes enum. Follow link for typedef.
enum NPDFHighlightingMode {
None,
Invert,
InvertOutline,
Push,
Unknown = 0xff
}
Font types enum. Follow link for typedef.
enum NPDFFontType {
TrueType,
Type1Pfa,
Type1Pfb,
Type1Base14,
Type3
}
Color space enum. Follow link for typedef.
enum NPDFColorSpace {
DeviceGray,
DeviceRGB,
DeviceCMYK,
Separation,
CieLab,
Indexed
}
Text rendering modes enum. Follow link for typedef.
enum NPDFTextRenderingMode {
Fill,
Stroke,
FillAndStroke,
Invisible,
FillToClipPath,
StrokeToClipPath,
FillAndStrokeToClipPath,
ToClipPath
}
Linecap styles enum. Follow link for typedef.
enum NPDFLineCapStyle {
Butt,
Round,
Square
}
Linejoin style enum. Follow link for typedef.
enum NPDFLineJoinStyle {
Miter,
Round,
Bevel
}
Vertical alignment enum. Follow link for typedef.
/**
* 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
*/
enum NPDFVerticalAlignment {
Top,
Center,
Bottom
}
Alignment enum. Follow link for typedef.
/**
* 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
*/
enum NPDFAlignment {
Left,
Center,
Bottom
}
type NPDFDictionaryKeyType = 'boolean' | 'long' | 'name' | 'real'
NPDFInternal is used to represent an internal pointer or data structure. This data type is not exported as a Javascript value. type NPDFInternal = any
type NPDFCoerceKeyType = 'boolean' | 'long' | 'name' | 'real'
type NPDFDataType = 'Boolean' | 'Number' | 'Name' | 'Real' | 'String' | 'Array' | 'Dictionary' | 'Reference' | 'RawData'
Signature flags enum. Follow link for typedef.
enum SigFlags {
SignatureExists = 1,
AppendOnly = 2,
SignatureExistsAppendOnly = 3
}
Supported image formats; enum. Follow link for typedef.
enum NPDFImageFormat {
data,
png,
tiff,
jpeg,
}
Encodings enum. Follow link for typedef.
enum NPDFFontEncoding {
WinAnsi = 1,
Standard = 2,
PdfDoc = 3,
MacRoman = 4,
MacExpert = 5,
Symbol = 6,
ZapfDingbats = 7,
Win1250 = 8,
Iso88592 = 9,
Identity = 0
}
Page mode enum. Follow link for typedef.
enum NPDFPageMode {
DontCare,
UseNone,
UseThumbs,
UseBookmarks,
FullScreen,
UseOC,
UseAttachments
}
Page layout enum. Follow link for typedef.
enum NPDFPageLayout {
Ignore,
Default,
SinglePage,
OneColumn,
TwoColumnLeft,
TwoColumnRight,
TwoPageLeft,
TwoPageRight
}
Font options interface. Follow link for typedef.
interface NPDFCreateFontOpts {
fontName: string,
bold?: boolean,
italic?: boolean,
encoding?: NPDFFontEncoding,
embed?: boolean,
fileName?: string
}
Annotation appearance enum. Follow link for typedef.
enum NPDFAnnotationAppearance {
normal,
rollover,
down
}
List field, list item. typescript type ListItem = { value: string, display: string }
Textfield options interface. Follow link for typedef.
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
}
Certificate permissions enum. Follow link for typedef.
enum NPDFCertificatePermission {
NoPerms = 1,
FormFill = 2,
Annotations = 3,
}
Field types enum. Follow link for typedef.
enum NPDFFieldType {
PushButton,
CheckBox,
RadioButton,
TextField,
ComboBox,
ListBox,
Signature,
Unknown = 0xff
}
type NPDFAnnotationBorderStyle = { horizontal: number, vertical: number, width: number }
type ProtectionOption = 'Copy' | 'Print' | 'Edit' | 'EditNotes' | 'FillAndSign' | 'Accessible' | 'DocAssembly' | 'HighPrint'
Encryption constructor options. Follow link for typedef.
type EncryptOption = {
userPassword?: string
ownerPassword?: string
protection?: Array<ProtectionOption>
algorithm?: 'rc4v1' | 'rc4v2' | 'aesv2' | 'aesv3'
keyLength?: number
}
Encryption protections summary. Follow link for typedef
type ProtectionSummary = {
Accessible: boolean
Print: boolean
Copy: boolean
DocAssembly: boolean
Edit: boolean
EditNotes: boolean
FillAndSign: boolean
HighPrint: boolean
}
Destination type enum. Follow link for typedef.
enum NPDFDestinationType {
XYZ,
Fit,
FitH,
FitV,
FitR,
FitB,
FitBH,
FitBV,
Unknown = 0xFF
}
Destination fit enum. Follow link for typedef.
enum NPDFDestinationFit {
Fit,
FitH,
FitV,
FitB,
FitBH,
FitBV,
Unknown = 0xFF
}
Annotation enum. An annotation must be one of these types. Follow link for typedef.
enum NPDFAnnotation {
Text = 0,
Link,
FreeText,
Line,
Square,
Circle,
Polygon,
PolyLine,
Highlight,
Underline,
Squiggly,
StrikeOut,
Stamp,
Caret,
Ink,
Popup,
FileAttachement,
Sound,
Movie,
Widget,
Screen,
PrinterMark,
TrapNet,
Watermark,
_3D,
RichMedia,
WebMedia,
}
Annotation flags enum. Follow link for typedef.
enum NPDFAnnotationFlag {
Invisible = 0x0001,
Hidden = 0x0002,
Print = 0x0004,
NoZoom = 0x0008,
NoRotate = 0x0010,
NoView = 0x0020,
ReadOnly = 0x0040,
Locked = 0x0080,
ToggleNoView = 0x0100,
LockedContents = 0x0200
}
Annotation type string enum. Follow link for typedef.
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'
}
Document information interface. Follow link for typedef.
interface NPDFInfo {
author: string
createdAt: Date
creator: string
keywords: string
producer: string
subject: string
title: string
}
PDF version enum. Follow link for typedef.
enum NPDFVersion {
Pdf11,
Pdf12,
Pdf13,
Pdf14,
Pdf15,
Pdf16,
Pdf17,
}
Write modes enum. Follow link for typedef.
enum NPDFWriteMode {
Default = 0x01,
Compact = 0x02
}
PDF Action types enum. Follow link for typedef.
enum NPDFActions {
GoTo = 0,
GoToR,
GoToE,
Launch,
Thread,
URI,
Sound,
Movie,
Hide,
Named,
SubmitForm,
ResetForm,
ImportData,
JavaScript,
SetOCGState,
Rendition,
Trans,
GoTo3DView,
RichMediaExecute,
Unknown = 0xff
}
Mouse events enum. Follow link for typedef.
enum NPDFMouseEvent {
up,
down,
enter,
exit
}
Page events enum. Follow link for typedef.
enum NPDFPageEvent {
open,
close,
visible,
invisible
}
Blend modes string enum. Follow link for typedef.
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"
}
Rendering intent enum. Follow link for typedef.
enum NPDFRenderingIntent {
AbsoluteColorimetric = "AbsoluteColorimetric",
RelativeColorimetric = "RelativeColorimetric",
Perceptual = "Perceptual",
Saturation = "Saturation"
}