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

cross-platform-pdf-generator

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-platform-pdf-generator - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "cross-platform-pdf-generator",
"version": "0.2.0",
"version": "0.2.1",
"description": "pulsation pdg generator for web and ios",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -432,11 +432,11 @@ import { PDFDocument, StandardFonts, rgb, PDFFont, PDFPage, PDFTextField } from 'pdf-lib';

const font = await document.embedFont(StandardFonts.Helvetica);
const img = json?.documentSettings?.footerPNG;
const img = json?.documentSettings?.footerJPGx;
//create PDF Img
let pngImage;
let jpegImage;
try {
const baseIMG = await document.embedPng(img);
pngImage = baseIMG;
const baseIMG = await document.embedJpg(img);
jpegImage = baseIMG;
}catch {
pngImage = null;
jpegImage = null;
}

@@ -446,3 +446,3 @@

pages.forEach(page => {
printFooterOnPage(page, document, pngImage, i, font,
printFooterOnPage(page, document, jpegImage, i, font,
json?.documentSettings?.footerText,

@@ -449,0 +449,0 @@ json?.documentSettings?.footerVersion,

@@ -18,3 +18,3 @@ import { GenericStorage } from "./utils/GenericUtils/GenericStorage.js";

"footer": false,
"footerPNG": "", //set footer img as base64 encoded String
"footerJPG": "", //set footer img as base64 encoded String
"footerText": "",

@@ -190,3 +190,3 @@ "footerVersion": "0.0.0", // is environment == node this is not used (package version will print on footer)

if (value === undefined) return;
const valueToPrint = value?.value ?? "Ungültiger Wert im Druck"
const valueToPrint = value?.humanReadableDescription ?? "Ungültiger Wert im Druck"
/*

@@ -193,0 +193,0 @@ const rawValue = getValueFromStorage(value); //ToDo load human readable string instead of value

@@ -29,2 +29,3 @@

* @param {String} view_name
* @param {String} humanReadableDescription
*/

@@ -36,3 +37,3 @@ constructor(creation_date, creator, geo_lat,

server_function, server_query, storagePath, syncTag,
value, value_type, view_id, view_name) {
value, value_type, view_id, view_name, humanReadableDescription) {

@@ -64,2 +65,3 @@ if (row_id == null) { throw { name: "GenericStorage ERROR", message: "GenericStorage needs to have valid row uuids" }; }

this.view_name = view_name;
this.humanReadableDescription = humanReadableDescription;
}

@@ -66,0 +68,0 @@

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