Lines Matching refs:options

77 	Document.prototype._createDoc = function(options, callback) {
81 var doc = printer.createPdfKitDocument(this.docDefinition, options);
95 Document.prototype._getPages = function(options, cb){
97 this._createDoc(options, function(ignoreBuffer, pages){
167 Document.prototype.getBase64 = function(cb, options) {
169 this._createDoc(options, function(buffer) {
174 Document.prototype.getDataUrl = function(cb, options) {
176 this._createDoc(options, function(buffer) {
181 Document.prototype.getBuffer = function(cb, options) {
183 this._createDoc(options, function(buffer){
2073 PdfPrinter.prototype.createPdfKitDocument = function(docDefinition, options) {
2074 options = options || {};
2096 if (options.tableLayouts) {
2097 builder.registerTableLayouts(options.tableLayouts);
2104 if(options.autoPrint){
2199 …var previousPageOrientation = pdfKitDoc.options.size[0] > pdfKitDoc.options.size[1] ? 'landscape' …
2202 var width = pdfKitDoc.options.size[0];
2203 var height = pdfKitDoc.options.size[1];
2204 pdfKitDoc.options.size = [height, width];
2213 pdfKitDoc.addPage(pdfKitDoc.options);
9209 function debounce(func, wait, options) {
9225 if (options === true) {
9228 } else if (isObject(options)) {
9229 leading = options.leading;
9230 maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
9231 trailing = 'trailing' in options ? options.trailing : trailing;
9720 function throttle(func, wait, options) {
9727 if (options === false) {
9729 } else if (isObject(options)) {
9730 leading = 'leading' in options ? !!options.leading : leading;
9731 trailing = 'trailing' in options ? !!options.trailing : trailing;
11946 function template(string, options, otherOptions) {
11951 if (otherOptions && isIterateeCall(string, options, otherOptions)) {
11952 options = otherOptions = null;
11955 options = baseAssign(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
11957 … var imports = baseAssign(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
11964 interpolate = options.interpolate || reNoMatch,
11969 (options.escape || reNoMatch).source + '|' +
11972 (options.evaluate || reNoMatch).source + '|$'
11977 ('sourceURL' in options
11978 ? options.sourceURL
12011 var variable = options.variable;
12178 function trunc(string, options, guard) {
12179 if (guard && isIterateeCall(string, options, guard)) {
12180 options = null;
12185 if (options != null) {
12186 if (isObject(options)) {
12187 var separator = 'separator' in options ? options.separator : separator;
12188 length = 'length' in options ? +options.length || 0 : length;
12189 omission = 'omission' in options ? baseToString(options.omission) : omission;
12191 length = +options || 0;
12456 function mixin(object, source, options) {
12457 if (options == null) {
12464 options = source;
12477 if (options === false) {
12479 } else if (isObject(options) && 'chain' in options) {
12480 chain = options.chain;
15830 function generateFrame(data, options) {
15836 options = options || {};
15837 var ver = options.version || -1;
15838 var ecclevel = ECCLEVELS[(options.eccLevel || 'L').toUpperCase()];
15839 var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1;
15840 var mask = 'mask' in options ? options.mask : -1;
15887 function buildCanvas(data, options) {
15893 var matrix = generateFrame(data, options);
15895 var modSize = Math.floor( options.fit ? options.fit/n : 5 );
17056 function PDFDocument(options) {
17058 this.options = options != null ? options : {};
17061 this.compress = (_ref = this.options.compress) != null ? _ref : true;
17087 if (this.options.info) {
17088 _ref1 = this.options.info;
17121 PDFDocument.prototype.addPage = function(options) {
17123 if (options == null) {
17124 options = this.options;
17126 if (!this.options.bufferPages) {
17129 this.page = new PDFPage(this, options);
17325 Stream.prototype.pipe = function(dest, options) {
17348 if (!dest._isStdio && (!options || options.end !== false)) {
17826 function ReadableState(options, stream) {
17829 options = options || {};
17833 var hwm = options.highWaterMark;
17834 var defaultHwm = options.objectMode ? 16 : 16 * 1024;
17864 this.objectMode = !!options.objectMode;
17867 this.objectMode = this.objectMode || !!options.readableObjectMode;
17872 this.defaultEncoding = options.defaultEncoding || 'utf8';
17886 if (options.encoding) {
17889 this.decoder = new StringDecoder(options.encoding);
17890 this.encoding = options.encoding;
17894 function Readable(options) {
17898 return new Readable(options);
17900 this._readableState = new ReadableState(options, this);
19025 function Duplex(options) {
19027 return new Duplex(options);
19029 Readable.call(this, options);
19030 Writable.call(this, options);
19032 if (options && options.readable === false)
19035 if (options && options.writable === false)
19039 if (options && options.allowHalfOpen === false)
19118 function WritableState(options, stream) {
19121 options = options || {};
19126 var hwm = options.highWaterMark;
19127 var defaultHwm = options.objectMode ? 16 : 16 * 1024;
19132 this.objectMode = !!options.objectMode;
19135 this.objectMode = this.objectMode || !!options.writableObjectMode;
19151 var noDecode = options.decodeStrings === false;
19157 this.defaultEncoding = options.defaultEncoding || 'utf8';
19206 function Writable(options) {
19212 return new Writable(options);
19214 this._writableState = new WritableState(options, this);
19856 function TransformState(options, stream) {
19893 function Transform(options) {
19895 return new Transform(options);
19897 Duplex.call(this, options);
19899 this._transformState = new TransformState(options, this);
20031 function PassThrough(options) {
20033 return new PassThrough(options);
20035 Transform.call(this, options);
27329 assert.AssertionError = function AssertionError(options) {
27331 this.actual = options.actual;
27332 this.expected = options.expected;
27333 this.operator = options.operator;
27334 if (options.message) {
27335 this.message = options.message;
27341 var stackStartFunction = options.stackStartFunction || fail;
27664 function PDFPage(document, options) {
27667 if (options == null) {
27668 options = {};
27670 this.size = options.size || 'letter';
27671 this.layout = options.layout || 'portrait';
27672 if (typeof options.margin === 'number') {
27674 top: options.margin,
27675 left: options.margin,
27676 bottom: options.margin,
27677 right: options.margin
27680 this.margins = options.margins || DEFAULT_MARGINS;
28434 dash: function(length, options) {
28436 if (options == null) {
28437 options = {};
28442 space = (_ref = options.space) != null ? _ref : length;
28443 phase = options.phase || 0;
28585 rotate: function(angle, options) {
28587 if (options == null) {
28588 options = {};
28594 if (options.origin != null) {
28595 _ref = options.origin, x = _ref[0], y = _ref[1];
28603 scale: function(xFactor, yFactor, options) {
28608 if (options == null) {
28609 options = {};
28613 options = yFactor;
28616 if (options.origin != null) {
28617 _ref = options.origin, x = _ref[0], y = _ref[1];
31639 _text: function(text, x, y, options, lineCallback) {
31641 options = this._initOptions(x, y, options);
31643 if (options.wordSpacing) {
31646 if (options.width) {
31649 wrapper = new LineWrapper(this, options);
31652 this._wrapper = options.continued ? wrapper : null;
31653 this._textOptions = options.continued ? options : null;
31654 wrapper.wrap(text, options);
31659 lineCallback(line, options);
31664 text: function(text, x, y, options) {
31665 return this._text(text, x, y, options, this._line.bind(this));
31667 widthOfString: function(string, options) {
31668 if (options == null) {
31669 options = {};
31671 …return this._font.widthOfString(string, this._fontSize) + (options.characterSpacing || 0) * (strin…
31673 heightOfString: function(text, options) {
31675 if (options == null) {
31676 options = {};
31679 options = this._initOptions(options);
31680 options.height = Infinity;
31681 lineGap = options.lineGap || this._lineGap || 0;
31682 this._text(text, this.x, this.y, options, (function(_this) {
31683 return function(line, options) {
31692 list: function(list, x, y, options, wrapper) {
31694 options = this._initOptions(x, y, options);
31696 indent = options.textIndent || r * 5;
31697 itemIndent = options.bulletIndent || r * 8;
31718 wrapper = new LineWrapper(this, options);
31751 wrapper.wrap(items.join('\n'), options);
31754 _initOptions: function(x, y, options) {
31759 if (options == null) {
31760 options = {};
31763 options = x;
31766 options = (function() {
31769 for (k in options) {
31770 v = options[k];
31780 if (options[key] == null) {
31781 options[key] = val;
31792 if (options.lineBreak !== false) {
31794 if (options.width == null) {
31795 options.width = this.page.width - this.x - margins.right;
31798 options.columns || (options.columns = 0);
31799 if (options.columnGap == null) {
31800 options.columnGap = 18;
31802 return options;
31804 _line: function(text, options, wrapper) {
31806 if (options == null) {
31807 options = {};
31809 this._fragment(text, this.x, this.y, options);
31810 lineGap = options.lineGap || this._lineGap || 0;
31817 _fragment: function(text, x, y, options) {
31823 align = options.align || 'left';
31824 wordSpacing = options.wordSpacing || 0;
31825 characterSpacing = options.characterSpacing || 0;
31826 if (options.width) {
31829 textWidth = this.widthOfString(text.replace(/\s+$/, ''), options);
31830 x += options.lineWidth - textWidth;
31833 x += options.lineWidth / 2 - options.textWidth / 2;
31837 textWidth = this.widthOfString(text.replace(/\s+/g, ''), options);
31839 …wordSpacing = Math.max(0, (options.lineWidth - textWidth) / Math.max(1, words.length - 1) - spaceW…
31842 …renderedWidth = options.textWidth + (wordSpacing * (options.wordCount - 1)) + (characterSpacing * …
31843 if (options.link) {
31844 this.link(x, y, renderedWidth, this.currentLineHeight(), options.link);
31846 if (options.underline || options.strike) {
31848 if (!options.stroke) {
31853 d = options.underline ? 1 : 2;
31855 if (options.underline) {
31873 mode = options.fill && options.stroke ? 2 : options.stroke ? 1 : 0;
31936 function LineWrapper(document, options) {
31939 this.indent = options.indent || 0;
31940 this.characterSpacing = options.characterSpacing || 0;
31941 this.wordSpacing = options.wordSpacing === 0;
31942 this.columns = options.columns || 1;
31943 this.columnGap = (_ref = options.columnGap) != null ? _ref : 18;
31944 this.lineWidth = (options.width - (this.columnGap * (this.columns - 1))) / this.columns;
31949 this.ellipsis = options.ellipsis;
31951 if (options.height != null) {
31952 this.height = options.height;
31953 this.maxY = this.startY + options.height;
31958 return function(options) {
31966 if (options.continued && !_this.continuedX) {
31969 if (!options.continued) {
31976 return function(options) {
31978 align = options.align;
31980 options.align = 'left';
31984 _this.document.y += options.paragraphGap || 0;
31985 options.align = align;
32033 LineWrapper.prototype.wrap = function(text, options) {
32035 if (options.indent != null) {
32036 this.indent = options.indent;
32038 if (options.characterSpacing != null) {
32039 this.characterSpacing = options.characterSpacing;
32041 if (options.wordSpacing != null) {
32042 this.wordSpacing = options.wordSpacing;
32044 if (options.ellipsis != null) {
32045 this.ellipsis = options.ellipsis;
32058 options.textWidth = textWidth + _this.wordSpacing * (wc - 1);
32059 options.wordCount = wc;
32060 options.lineWidth = _this.lineWidth;
32062 _this.emit('line', buffer, options, _this);
32066 this.emit('sectionStart', options, this);
32071 _this.emit('firstLine', options, _this);
32081 _this.emit('lastLine', options, _this);
32128 this.emit('lastLine', options, this);
32131 this.emit('sectionEnd', options, this);
32132 if (options.continued === true) {
32136 this.continuedX += options.textWidth;
32143 LineWrapper.prototype.nextSection = function(options) {
32145 this.emit('sectionEnd', options, this);
32158 this.emit('pageBreak', options, this);
32162 this.emit('columnBreak', options, this);
32164 this.emit('sectionStart', options, this);
65186 image: function(src, x, y, options) {
65188 if (options == null) {
65189 options = {};
65192 options = x;
65195 x = (_ref = x != null ? x : options.x) != null ? _ref : this.x;
65196 y = (_ref1 = y != null ? y : options.y) != null ? _ref1 : this.y;
65210 w = options.width || image.width;
65211 h = options.height || image.height;
65212 if (options.width && !options.height) {
65216 } else if (options.height && !options.width) {
65220 } else if (options.scale) {
65221 w = image.width * options.scale;
65222 h = image.height * options.scale;
65223 } else if (options.fit) {
65224 _ref2 = options.fit, bw = _ref2[0], bh = _ref2[1];
65234 if (options.align === 'center') {
65236 } else if (options.align === 'right') {
65239 if (options.valign === 'center') {
65241 } else if (options.valign === 'bottom') {
65898 annotate: function(x, y, w, h, options) {
65900 options.Type = 'Annot';
65901 options.Rect = this._convertRect(x, y, w, h);
65902 options.Border = [0, 0, 0];
65903 if (options.Subtype !== 'Link') {
65904 if (options.C == null) {
65905 options.C = this._normalizeColor(options.color || [0, 0, 0]);
65908 delete options.color;
65909 if (typeof options.Dest === 'string') {
65910 options.Dest = new String(options.Dest);
65912 for (key in options) {
65913 val = options[key];
65914 options[key[0].toUpperCase() + key.slice(1)] = val;
65916 ref = this.ref(options);
65921 note: function(x, y, w, h, contents, options) {
65922 if (options == null) {
65923 options = {};
65925 options.Subtype = 'Text';
65926 options.Contents = new String(contents);
65927 options.Name = 'Comment';
65928 if (options.color == null) {
65929 options.color = [243, 223, 92];
65931 return this.annotate(x, y, w, h, options);
65933 link: function(x, y, w, h, url, options) {
65934 if (options == null) {
65935 options = {};
65937 options.Subtype = 'Link';
65938 options.A = this.ref({
65942 options.A.end();
65943 return this.annotate(x, y, w, h, options);
65945 _markup: function(x, y, w, h, options) {
65947 if (options == null) {
65948 options = {};
65951 options.QuadPoints = [x1, y2, x2, y2, x1, y1, x2, y1];
65952 options.Contents = new String;
65953 return this.annotate(x, y, w, h, options);
65955 highlight: function(x, y, w, h, options) {
65956 if (options == null) {
65957 options = {};
65959 options.Subtype = 'Highlight';
65960 if (options.color == null) {
65961 options.color = [241, 238, 148];
65963 return this._markup(x, y, w, h, options);
65965 underline: function(x, y, w, h, options) {
65966 if (options == null) {
65967 options = {};
65969 options.Subtype = 'Underline';
65970 return this._markup(x, y, w, h, options);
65972 strike: function(x, y, w, h, options) {
65973 if (options == null) {
65974 options = {};
65976 options.Subtype = 'StrikeOut';
65977 return this._markup(x, y, w, h, options);
65979 lineAnnotation: function(x1, y1, x2, y2, options) {
65980 if (options == null) {
65981 options = {};
65983 options.Subtype = 'Line';
65984 options.Contents = new String;
65985 options.L = [x1, this.page.height - y1, x2, this.page.height - y2];
65986 return this.annotate(x1, y1, x2, y2, options);
65988 rectAnnotation: function(x, y, w, h, options) {
65989 if (options == null) {
65990 options = {};
65992 options.Subtype = 'Square';
65993 options.Contents = new String;
65994 return this.annotate(x, y, w, h, options);
65996 ellipseAnnotation: function(x, y, w, h, options) {
65997 if (options == null) {
65998 options = {};
66000 options.Subtype = 'Circle';
66001 options.Contents = new String;
66002 return this.annotate(x, y, w, h, options);
66004 textAnnotation: function(x, y, w, h, text, options) {
66005 if (options == null) {
66006 options = {};
66008 options.Subtype = 'FreeText';
66009 options.Contents = new String(text);
66010 options.DA = new String;
66011 return this.annotate(x, y, w, h, options);