Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abstract-document

Package Overview
Dependencies
Maintainers
11
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-document - npm Package Compare versions

Comparing version 4.3.9 to 4.3.10

11

lib-cjs/abstract-document-exporters/pdf/render-image.js

@@ -5,2 +5,3 @@ "use strict";

var base64 = require("base64-js");
var svgToPdfKit = require("svg-to-pdfkit");
function renderImage(

@@ -48,2 +49,12 @@ // tslint:disable-next-line:no-any

}
else if (format === "svg") {
var svg = new TextDecoder().decode(component.data);
var imageWidth_1 = component.bottomRight.x - component.topLeft.x;
var imageHeight_1 = component.bottomRight.y - component.topLeft.y;
svgToPdfKit(pdf, svg, component.topLeft.x, component.topLeft.y, {
width: imageWidth_1,
height: imageHeight_1,
preserveAspectRatio: "xMinYMin"
});
}
break;

@@ -50,0 +61,0 @@ case "subimage":

import * as AD from "../../abstract-document";
import * as base64 from "base64-js";
import * as svgToPdfKit from "svg-to-pdfkit";
export function renderImage(

@@ -44,2 +45,12 @@ // tslint:disable-next-line:no-any

}
else if (format === "svg") {
var svg = new TextDecoder().decode(component.data);
var imageWidth_1 = component.bottomRight.x - component.topLeft.x;
var imageHeight_1 = component.bottomRight.y - component.topLeft.y;
svgToPdfKit(pdf, svg, component.topLeft.x, component.topLeft.y, {
width: imageWidth_1,
height: imageHeight_1,
preserveAspectRatio: "xMinYMin"
});
}
break;

@@ -46,0 +57,0 @@ case "subimage":

3

package.json
{
"name": "abstract-document",
"version": "4.3.9",
"version": "4.3.10",
"description": "Dynamically create documents using code or JSX and render to any format",

@@ -27,2 +27,3 @@ "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-document",

"remark-sub-super": "^1.0.19",
"svg-to-pdfkit": "^0.1.8",
"ts-exhaustive-check": "^1.0.0",

@@ -29,0 +30,0 @@ "unified": "^6.1.6"

import * as AbstractImage from "abstract-image";
import * as AD from "../../abstract-document";
import * as base64 from "base64-js";
import * as svgToPdfKit from "svg-to-pdfkit";

@@ -50,2 +51,11 @@ export function renderImage(

});
} else if (format === "svg") {
const svg = new TextDecoder().decode(component.data);
const imageWidth = component.bottomRight.x - component.topLeft.x;
const imageHeight = component.bottomRight.y - component.topLeft.y;
svgToPdfKit(pdf, svg, component.topLeft.x, component.topLeft.y, {
width: imageWidth,
height: imageHeight,
preserveAspectRatio: "xMinYMin"
});
}

@@ -52,0 +62,0 @@ break;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc