+ // ratio that you use in multiplication of a given "size" number to arrive to 'point'
+ // units of measurement.
+ // scaleFactor is set at initialization of the document and calculated against the stated
+ // default measurement units for the document.
+ // If default is "mm", k is the number that will turn number in 'mm' into 'points' number.
+ // through multiplication.
+ 'scaleFactor': k,
+ 'pageSize': {
+ get width() {
+ return pageWidth;
+ },
+ get height() {
+ return pageHeight;
+ }
+ },
+ 'output': function output(type, options) {
+ return _output(type, options);
+ },
+ 'getNumberOfPages': function getNumberOfPages() {
+ return pages.length - 1;
+ },
+ 'pages': pages,
+ 'out': out,
+ 'f2': f2,
+ 'getPageInfo': function getPageInfo(pageNumberOneBased) {
+ var objId = (pageNumberOneBased - 1) * 2 + 3;
+ return {
+ objId: objId,
+ pageNumber: pageNumberOneBased,
+ pageContext: pagesContext[pageNumberOneBased]
+ };
+ },
+ 'getCurrentPageInfo': function getCurrentPageInfo() {
+ var objId = (currentPage - 1) * 2 + 3;
+ return {
+ objId: objId,
+ pageNumber: currentPage,
+ pageContext: pagesContext[currentPage]
+ };
+ },
+ 'getPDFVersion': function getPDFVersion() {
+ return pdfVersion;
+ }
+ };
+
+ /**
+ * Adds (and transfers the focus to) new page to the PDF document.
+ * @function
+ * @returns {jsPDF}
+ *
+ * @methodOf jsPDF#
+ * @name addPage
+ */
+ API.addPage = function () {
+ _addPage.apply(this, arguments);
+ return this;
+ };
+ /**
+ * Adds (and transfers the focus to) new page to the PDF document.
+ * @function
+ * @returns {jsPDF}
+ *
+ * @methodOf jsPDF#
+ * @name setPage
+ * @param {Number} page Switch the active page to the page number specified
+ * @example
+ * doc = jsPDF()
+ * doc.addPage()
+ * doc.addPage()
+ * doc.text('I am on page 3', 10, 10)
+ * doc.setPage(1)
+ * doc.text('I am on page 1', 10, 10)
+ */
+ API.setPage = function () {
+ _setPage.apply(this, arguments);
+ return this;
+ };
+ API.insertPage = function (beforePage) {
+ this.addPage();
+ this.movePage(currentPage, beforePage);
+ return this;
+ };
+ API.movePage = function (targetPage, beforePage) {
+ if (targetPage > beforePage) {
+ var tmpPages = pages[targetPage];
+ var tmpPagedim = pagedim[targetPage];
+ var tmpPagesContext = pagesContext[targetPage];
+ for (var i = targetPage; i > beforePage; i--) {
+ pages[i] = pages[i - 1];
+ pagedim[i] = pagedim[i - 1];
+ pagesContext[i] = pagesContext[i - 1];
+ }
+ pages[beforePage] = tmpPages;
+ pagedim[beforePage] = tmpPagedim;
+ pagesContext[beforePage] = tmpPagesContext;
+ this.setPage(beforePage);
+ } else if (targetPage < beforePage) {
+ var tmpPages = pages[targetPage];
+ var tmpPagedim = pagedim[targetPage];
+ var tmpPagesContext = pagesContext[targetPage];
+ for (var i = targetPage; i < beforePage; i++) {
+ pages[i] = pages[i + 1];
+ pagedim[i] = pagedim[i + 1];
+ pagesContext[i] = pagesContext[i + 1];
+ }
+ pages[beforePage] = tmpPages;
+ pagedim[beforePage] = tmpPagedim;
+ pagesContext[beforePage] = tmpPagesContext;
+ this.setPage(beforePage);
+ }
+ return this;
+ };
+
+ API.deletePage = function () {
+ _deletePage.apply(this, arguments);
+ return this;
+ };
+
+ /**
+ * Set the display mode options of the page like zoom and layout.
+ *
+ * @param {integer|String} zoom You can pass an integer or percentage as
+ * a string. 2 will scale the document up 2x, '200%' will scale up by the
+ * same amount. You can also set it to 'fullwidth', 'fullheight',
+ * 'fullpage', or 'original'.
+ *
+ * Only certain PDF readers support this, such as Adobe Acrobat
+ *
+ * @param {String} layout Layout mode can be: 'continuous' - this is the
+ * default continuous scroll. 'single' - the single page mode only shows one
+ * page at a time. 'twoleft' - two column left mode, first page starts on
+ * the left, and 'tworight' - pages are laid out in two columns, with the
+ * first page on the right. This would be used for books.
+ * @param {String} pmode 'UseOutlines' - it shows the
+ * outline of the document on the left. 'UseThumbs' - shows thumbnails along
+ * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
+ *
+ * @function
+ * @returns {jsPDF}
+ * @name setDisplayMode
+ */
+ API.setDisplayMode = function (zoom, layout, pmode) {
+ zoomMode = zoom;
+ layoutMode = layout;
+ pageMode = pmode;
+
+ var validPageModes = [undefined, null, 'UseNone', 'UseOutlines', 'UseThumbs', 'FullScreen'];
+ if (validPageModes.indexOf(pmode) == -1) {
+ throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + pmode + '" is not recognized.');
+ }
+ return this;
+ },
+
+ /**
+ * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
+ *
+ * @function
+ * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Object} flags Collection of settings signalling how the text must be encoded. Defaults are sane. If you think you want to pass some flags, you likely can read the source.
+ * @returns {jsPDF}
+ * @methodOf jsPDF#
+ * @name text
+ */
+ API.text = function (text, x, y, flags, angle, align) {
+ /**
+ * Inserts something like this into PDF
+ * BT
+ * /F1 16 Tf % Font name + size
+ * 16 TL % How many units down for next line in multiline text
+ * 0 g % color
+ * 28.35 813.54 Td % position
+ * (line one) Tj
+ * T* (line two) Tj
+ * T* (line three) Tj
+ * ET
+ */
+ function ESC(s) {
+ s = s.split("\t").join(Array(options.TabLen || 9).join(" "));
+ return pdfEscape(s, flags);
+ }
+
+ // Pre-August-2012 the order of arguments was function(x, y, text, flags)
+ // in effort to make all calls have similar signature like
+ // By patrick-roberts, github.com/MrRio/jsPDF/issues/328
+ // Call .clip() after calling .rect() with a style argument of null
+ out('W'); // clip
+ out('S'); // stroke path; necessary for clip to work
+ };
+
+ /**
+ * This fixes the previous function clip(). Perhaps the 'stroke path' hack was due to the missing 'n' instruction?
+ * We introduce the fixed version so as to not break API.
+ * @param fillRule
+ */
+ API.clip_fixed = function (fillRule) {
+ // Call .clip() after calling drawing ops with a style argument of null
+ // W is the PDF clipping op
+ if ('evenodd' === fillRule) {
+ out('W*');
+ } else {
+ out('W');
+ }
+ // End the path object without filling or stroking it.
+ // This operator is a path-painting no-op, used primarily for the side effect of changing the current clipping path
+ // (see Section 4.4.3, “Clipping Path Operators”)
+ out('n');
+ };
+
+ /**
+ * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
+ * All data points in `lines` are relative to last line origin.
+ * `x`, `y` become x1,y1 for first line / curve in the set.
+ * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
+ * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
+ * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @param {Boolean} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
+ * @function
+ * @returns {jsPDF}
+ * @methodOf jsPDF#
+ * @name lines
+ */
+ API.lines = function (lines, x, y, scale, style, closed) {
+ var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4;
+
+ // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)
+ // in effort to make all calls have similar signature like
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} w Width (in units declared at inception of PDF document)
+ * @param {Number} h Height (in units declared at inception of PDF document)
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @param {Number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ this.lines([[x2 - x1, y2 - y1], // vector to point 2
+ [x3 - x2, y3 - y2], // vector to point 3
+ [x1 - x3, y1 - y3] // closing vector back to point 1
+ ], x1, y1, // start of path
+ [1, 1], style, true);
+ return this;
+ };
+
+ /**
+ * Adds a rectangle with rounded corners to PDF
+ *
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} w Width (in units declared at inception of PDF document)
+ * @param {Number} h Height (in units declared at inception of PDF document)
+ * @param {Number} rx Radius along x axis (in units declared at inception of PDF document)
+ * @param {Number} rx Radius along y axis (in units declared at inception of PDF document)
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @returns {jsPDF}
+ * @methodOf jsPDF#
+ * @name roundedRect
+ */
+ API.roundedRect = function (x, y, w, h, rx, ry, style) {
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} rx Radius along x axis (in units declared at inception of PDF document)
+ * @param {Number} rx Radius along y axis (in units declared at inception of PDF document)
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @param {Number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param {Number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param {Number} r Radius (in units declared at inception of PDF document)
+ * @param {String} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument.
+ * @function
+ * @returns {jsPDF}
+ * @methodOf jsPDF#
+ * @name circle
+ */
+ API.circle = function (x, y, r, style) {
+ return this.ellipse(x, y, r, r, style);
+ };
+
+ /**
+ * Adds a properties to the PDF document
+ *
+ * @param {Object} A property_name-to-property_value object structure.
+ * @function
+ * @returns {jsPDF}
+ * @methodOf jsPDF#
+ * @name setProperties
+ */
+ API.setProperties = function (properties) {
+ // copying only those properties we can render.
+ for (var property in documentProperties) {
+ if (documentProperties.hasOwnProperty(property) && properties[property]) {
+ jsPDFAPI.addHTML = function (element, x, y, options, callback) {
+ 'use strict';
+
+ if (typeof html2canvas === 'undefined' && typeof rasterizeHTML === 'undefined') throw new Error('You need either ' + 'https://github.com/niklasvh/html2canvas' + ' or https://github.com/cburgmer/rasterizeHTML.js');
+
+ if (typeof x !== 'number') {
+ options = x;
+ callback = y;
+ }
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ var I = this.internal,
+ K = I.scaleFactor,
+ W = I.pageSize.width,
+ H = I.pageSize.height;
+
+ options = options || {};
+ options.onrendered = function (obj) {
+ x = parseInt(x) || 0;
+ y = parseInt(y) || 0;
+ var dim = options.dim || {};
+ var h = dim.h || 0;
+ var w = dim.w || Math.min(W, obj.width / K) - x;
+ * As stated, i imagine the method below is highly inefficent for large files.
+ *
+ * Also of note from Mozilla,
+ *
+ * "However, this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats)."
+ throw new Error('Invalid coordinates passed to jsPDF.addImage');
+ }
+
+ var images = getImages.call(this),
+ info;
+
+ if (!(info = checkImagesForAlias(imageData, images))) {
+ var dataAsBinaryString;
+
+ if (isDOMElement(imageData)) imageData = createDataURIFromElement(imageData, format, rotation);
+
+ if (notDefined(alias)) alias = generateAliasFromData(imageData);
+
+ if (!(info = checkImagesForAlias(alias, images))) {
+
+ if (this.isString(imageData)) {
+
+ var base64Info = this.extractInfoFromBase64DataURI(imageData);
+
+ if (base64Info) {
+
+ format = base64Info[2];
+ imageData = atob(base64Info[3]); //convert to binary string
+ } else {
+
+ if (imageData.charCodeAt(0) === 0x89 && imageData.charCodeAt(1) === 0x50 && imageData.charCodeAt(2) === 0x4e && imageData.charCodeAt(3) === 0x47) format = 'png';
+ }
+ }
+ format = (format || 'JPEG').toLowerCase();
+
+ if (doesNotSupportImageType(format)) throw new Error('addImage currently only supports formats ' + supported_image_types + ', not \'' + format + '\'');
+
+ if (processMethodNotEnabled(format)) throw new Error('please ensure that the plugin for \'' + format + '\' support is added');
+
+ /**
+ * need to test if it's more efficient to convert all binary strings
+ * to TypedArray - or should we just leave and process as string?
+ */
+ if (this.supportsArrayBuffer()) {
+ // no need to convert if imageData is already uint8array
+ * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
+ *
+ * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+ */
+
+ c2d.internal.createArc = function (radius, startAngle, endAngle, anticlockwise) {
+ var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below
+ var twoPI = Math.PI * 2;
+ var piOverTwo = Math.PI / 2.0;
+
+ // normalize startAngle, endAngle to [0, 2PI]
+ var startAngleN = startAngle;
+ if (startAngleN < twoPI || startAngleN > twoPI) {
+ startAngleN = startAngleN % twoPI;
+ }
+ if (startAngleN < 0) {
+ startAngleN = twoPI + startAngleN;
+ }
+
+ while (startAngle > endAngle) {
+ startAngle = startAngle - twoPI;
+ }
+ var totalAngle = Math.abs(endAngle - startAngle);
+ if (totalAngle < twoPI) {
+ if (anticlockwise) {
+ totalAngle = twoPI - totalAngle;
+ }
+ }
+
+ // Compute the sequence of arc curves, up to PI/2 at a time.
+ var curves = [];
+ var sgn = anticlockwise ? -1 : +1;
+
+ var a1 = startAngleN;
+ for (; totalAngle > EPSILON;) {
+ var remain = sgn * Math.min(totalAngle, piOverTwo);
+ * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.
+ *
+ * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+ *
+ * This algorithm is based on the approach described in: A. Riškus, "Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa," Information Technology and Control, 35(4), 2006 pp. 371-378.
+ */
+
+ c2d.internal.createSmallArc = function (r, a1, a2) {
+ // Compute all four points for an arc that subtends the same total angle
+ if (typeof callback === 'function') callback(out);else if (found_images) console.error('jsPDF Warning: rendering issues? provide a callback to fromHTML!');
+ });
+ return out || { x: r.x, y: r.y };
+ };
+ Renderer.prototype.init = function () {
+ this.paragraph = {
+ text: [],
+ style: []
+ };
+ return this.pdf.internal.write("q");
+ };
+ Renderer.prototype.dispose = function () {
+ this.pdf.internal.write("Q");
+ return {
+ x: this.x,
+ y: this.y,
+ ready: true
+ };
+ };
+
+ //Checks if we have to execute some watcher functions
+ //e.g. to end text floating around an image
+ Renderer.prototype.executeWatchFunctions = function (el) {
+ var ret = false;
+ var narray = [];
+ if (this.watchFunctions.length > 0) {
+ for (var i = 0; i < this.watchFunctions.length; ++i) {
+ if (this.watchFunctions[i](el) === true) {
+ ret = true;
+ } else {
+ narray.push(this.watchFunctions[i]);
+ }
+ }
+ this.watchFunctions = narray;
+ }
+ return ret;
+ };
+
+ Renderer.prototype.splitFragmentsIntoLines = function (fragments, styles) {
+ * This is what the value 'Predictor' in decode params relates to
+ *
+ * 15 is "optimal prediction", which means the prediction algorithm can change from line to line.
+ * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.
+ *
+ 0 None
+ 1 Sub
+ 2 Up
+ 3 Average
+ 4 Paeth
+ */
+
+ var doesNotHavePngJS = function doesNotHavePngJS() {
+ jsPDFAPI.processPNG = function (imageData, imageIndex, alias, compression, dataAsBinaryString) {
+ 'use strict';
+
+ var colorSpace = this.color_spaces.DEVICE_RGB,
+ decode = this.decode.FLATE_DECODE,
+ bpc = 8,
+ img,
+ dp,
+ trns,
+ colors,
+ pal,
+ smask;
+
+ /* if(this.isString(imageData)) {
+ }*/
+
+ if (this.isArrayBuffer(imageData)) imageData = new Uint8Array(imageData);
+
+ if (this.isArrayBufferView(imageData)) {
+
+ if (doesNotHavePngJS()) throw new Error("PNG support requires png.js and zlib.js");
+
+ img = new PNG(imageData);
+ imageData = img.imgData;
+ bpc = img.bits;
+ colorSpace = img.colorSpace;
+ colors = img.colors;
+
+ //logImg(img);
+
+ /*
+ * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.
+ *
+ * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.
+ *
+ * Extract alpha to create two separate images, using the alpha as a sMask
+ */
+ if ([4, 6].indexOf(img.colorType) !== -1) {
+
+ /*
+ * processes 8 bit RGBA and grayscale + alpha images
+ */
+ if (img.bits === 8) {
+
+ var pixels = img.pixelBitlength == 32 ? new Uint32Array(img.decodePixels().buffer) : img.pixelBitlength == 16 ? new Uint16Array(img.decodePixels().buffer) : new Uint8Array(img.decodePixels().buffer),
+ len = pixels.length,
+ imgData = new Uint8Array(len * img.colors),
+ alphaData = new Uint8Array(len),
+ pDiff = img.pixelBitlength - img.bits,
+ i = 0,
+ n = 0,
+ pixel,
+ pbl;
+
+ for (; i < len; i++) {
+ pixel = pixels[i];
+ pbl = 0;
+
+ while (pbl < pDiff) {
+
+ imgData[n++] = pixel >>> pbl & 0xff;
+ pbl = pbl + img.bits;
+ }
+
+ alphaData[i] = pixel >>> pbl & 0xff;
+ }
+ }
+
+ /*
+ * processes 16 bit RGBA and grayscale + alpha images
+ */
+ if (img.bits === 16) {
+
+ var pixels = new Uint32Array(img.decodePixels().buffer),
+* @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters "<", ">" or "&", those characters should be written using XML entities.
+* @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.
+* @function
+* @returns {jsPDF}
+* @methodOf jsPDF#
+* @name addMetadata
+*/
+
+(function (jsPDFAPI) {
+ 'use strict';
+
+ var xmpmetadata = "";
+ var xmpnamespaceuri = "";
+ var metadata_object_number = "";
+
+ jsPDFAPI.addMetadata = function (metadata, namespaceuri) {
+ xmpnamespaceuri = namespaceuri || "http://jspdf.default.namespaceuri/"; //The namespace URI for an XMP name shall not be empty
+ xmpmetadata = metadata;
+ this.internal.events.subscribe('postPutResources', function () {
+ if (!xmpmetadata) {
+ metadata_object_number = "";
+ } else {
+ var xmpmeta_beginning = '<x:xmpmeta xmlns:x="adobe:ns:meta/">';
+ var container = [node.nodeType === Node.TEXT_NODE ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
+ var negativeZindex = stack.contexts.filter(negativeZIndex); // 2. the child stacking contexts with negative stack levels (most negative first).
+ var descendantElements = stack.children.filter(isElement);
+ var descendantNonFloats = descendantElements.filter(not(isFloating));
+ var nonInlineNonPositionedDescendants = descendantNonFloats.filter(not(isPositioned)).filter(not(inlineLevel)); // 3 the in-flow, non-inline-level, non-positioned descendants.
+ var nonPositionedFloats = descendantElements.filter(not(isPositioned)).filter(isFloating); // 4. the non-positioned floats.
+ var inFlow = descendantNonFloats.filter(not(isPositioned)).filter(inlineLevel); // 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
+ var stackLevel0 = stack.contexts.concat(descendantNonFloats.filter(isPositioned)).filter(zIndex0); // 6. the child stacking contexts with stack level 0 and the positioned descendants with stack level 0.
+ var text = stack.children.filter(isTextNode).filter(hasText);
+ var positiveZindex = stack.contexts.filter(positiveZIndex); // 7. the child stacking contexts with positive stack levels (least positive first).
+ "content": "Monto a Pagar: <%=pagar%> <%=currency_simbol%>",
+ "size": 12,
+ "x": 145,
+ "y": 70,
+ "position" : null,
+ "fontStyle" : "normal"
+ },
+ "date_invoice": {
+ "content": "Fecha: <%=date_invoice%>",
+ "size": 12,
+ "x": 20,
+ "y": 77,
+ "position" : null,
+ "fontStyle" : "normal"
+ },
+ "date_maturity": {
+ "content": "Vencimiento: <%=vencimiento%>",
+ "size": 12,
+ "x": 145,
+ "y": 77,
+ "position" : null,
+ "fontStyle" : "normal"
+ },
+ "numeroLetras": {
+ "content": "Pagaré a <%=company_id_name%> o a su orden el monto de <%=currecy_name%>: <%=montoletras%>",
+ "size": 12,
+ "x": 20,
+ "y": 105,
+ "position" : null,
+ "fontStyle" : "normal"
+ },
+ "contenido": {
+ "content": "Por igual valor recibido en _ _ a mi (nuestra) entera satisfacción. Queda expresamente convenido que la falta de pago de este pagaré, me (nos) constituirá(n) en mora automáticamente, sin necesidad de interpelación judicial o extrajudicial alguna, devengando durante el tiempo de la mora un interés del _ _ , un interés moratorio 10 % por el simple retardo sin que esto implique prórroga del plazo de la obligación. Asimismo, me (nos) obligamos a pagar cualquier gasto en que incurra el acreedor con relación a este préstamo, en caso de que el mismo sea reclamado por la vía judicial o extrajudicial. El simple vencimiento establecerá la mora, autorizando la inclusión de mi Nombre Personal o Razón Social que represento a la base de datos de INFORMCONF conforme a lo establecido en la Ley 1682/01 y su modificatoria 1969/02, como también para que se pueda proveer la información a terceros interesados. A los efectos legales y procesales nos sometemos a la jurisdicción de los tribunales de la Ciudad del Este, Alto Paraná y renunciando a cualquier otra que pudiera corresponder. Las partes constituyen domicilio especial en los lugares indicados en el presente documento.",