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

@pdfme/generator

Package Overview
Dependencies
Maintainers
1
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pdfme/generator - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

dist/cjs/src/helper/draw.js

11

dist/cjs/src/generate.js

@@ -18,3 +18,4 @@ "use strict";

const common_1 = require("@pdfme/common");
const helper_js_1 = require("./helper.js");
const index_js_1 = require("./helper/index.js");
const draw_js_1 = require("./helper/draw.js");
const constants_js_1 = require("./constants.js");

@@ -27,4 +28,4 @@ const preprocessing = (arg) => __awaiter(void 0, void 0, void 0, function* () {

const fallbackFontName = (0, common_1.getFallbackFontName)(font);
const fontObj = yield (0, helper_js_1.embedAndGetFontObj)({ pdfDoc, font });
const pagesAndBoxes = yield (0, helper_js_1.getEmbeddedPagesAndEmbedPdfBoxes)({ pdfDoc, basePdf });
const fontObj = yield (0, index_js_1.embedAndGetFontObj)({ pdfDoc, font });
const pagesAndBoxes = yield (0, index_js_1.getEmbeddedPagesAndEmbedPdfBoxes)({ pdfDoc, basePdf });
const { embeddedPages, embedPdfBoxes } = pagesAndBoxes;

@@ -53,3 +54,3 @@ return { pdfDoc, fontObj, fallbackFontName, embeddedPages, embedPdfBoxes };

const page = pdfDoc.addPage([pageWidth, pageHeight]);
(0, helper_js_1.drawEmbeddedPage)({ page, embeddedPage, embedPdfBox });
(0, draw_js_1.drawEmbeddedPage)({ page, embeddedPage, embedPdfBox });
for (let l = 0; l < keys.length; l += 1) {

@@ -62,3 +63,3 @@ const key = keys[l];

// eslint-disable-next-line no-await-in-loop
yield (0, helper_js_1.drawInputByTemplateSchema)({
yield (0, draw_js_1.drawInputByTemplateSchema)({
input,

@@ -65,0 +66,0 @@ templateSchema,

@@ -6,7 +6,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.validateBarcodeInput = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.isBarcodeSchema = exports.isImageSchema = exports.isTextSchema = exports.BLANK_PDF = exports.generate = void 0;
exports.validateBarcodeInput = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.isBarcodeSchema = exports.isImageSchema = exports.isTextSchema = exports.HELVETICA = exports.BLANK_PDF = exports.generate = void 0;
const generate_js_1 = __importDefault(require("./generate.js"));
exports.generate = generate_js_1.default;
var common_1 = require("@pdfme/common");
const common_1 = require("@pdfme/common");
Object.defineProperty(exports, "BLANK_PDF", { enumerable: true, get: function () { return common_1.BLANK_PDF; } });
Object.defineProperty(exports, "HELVETICA", { enumerable: true, get: function () { return common_1.HELVETICA; } });
Object.defineProperty(exports, "isTextSchema", { enumerable: true, get: function () { return common_1.isTextSchema; } });

@@ -13,0 +14,0 @@ Object.defineProperty(exports, "isImageSchema", { enumerable: true, get: function () { return common_1.isImageSchema; } });

@@ -13,3 +13,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { getDefaultFont, getFallbackFontName, checkGenerateProps } from '@pdfme/common';
import { getEmbeddedPagesAndEmbedPdfBoxes, drawInputByTemplateSchema, drawEmbeddedPage, embedAndGetFontObj, } from './helper.js';
import { getEmbeddedPagesAndEmbedPdfBoxes, embedAndGetFontObj } from './helper/index.js';
import { drawInputByTemplateSchema, drawEmbeddedPage } from './helper/draw.js';
import { TOOL_NAME } from './constants.js';

@@ -16,0 +17,0 @@ const preprocessing = (arg) => __awaiter(void 0, void 0, void 0, function* () {

import generate from './generate.js';
export { generate };
export { BLANK_PDF, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, } from '@pdfme/common';
import { BLANK_PDF, HELVETICA, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, } from '@pdfme/common';
export { generate, BLANK_PDF, HELVETICA, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, };
//# sourceMappingURL=index.js.map
import generate from './generate.js';
export { generate };
export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, } from '@pdfme/common';
export { BLANK_PDF, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, } from '@pdfme/common';
import { BLANK_PDF, HELVETICA, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput } from '@pdfme/common';
import type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from '@pdfme/common';
export { generate, BLANK_PDF, HELVETICA, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, };
export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, };
{
"name": "@pdfme/generator",
"version": "1.1.5",
"version": "1.1.6",
"sideEffects": false,

@@ -37,3 +37,3 @@ "author": "hand-dot",

"scripts": {
"develop": "tsc -w",
"develop": "tsc -w -p tsconfig.esm.json",
"build": "npm run build:cjs && npm run build:esm",

@@ -40,0 +40,0 @@ "build:cjs": "tsc -p tsconfig.cjs.json",

@@ -5,10 +5,6 @@ import { PDFDocument } from 'pdf-lib';

import { getDefaultFont, getFallbackFontName, checkGenerateProps } from '@pdfme/common';
import {
getEmbeddedPagesAndEmbedPdfBoxes,
drawInputByTemplateSchema,
drawEmbeddedPage,
embedAndGetFontObj,
InputImageCache,
} from './helper.js';
import { getEmbeddedPagesAndEmbedPdfBoxes, embedAndGetFontObj } from './helper/index.js';
import { drawInputByTemplateSchema, drawEmbeddedPage } from './helper/draw.js';
import { TOOL_NAME } from './constants.js';
import type { InputImageCache } from './type';

@@ -15,0 +11,0 @@ const preprocessing = async (arg: {

import generate from './generate.js';
export { generate };
export type {
import {
BLANK_PDF,
HELVETICA,
isTextSchema,
isImageSchema,
isBarcodeSchema,
checkTemplate,
checkUIProps,
checkPreviewProps,
checkDesignerProps,
checkGenerateProps,
validateBarcodeInput,
} from '@pdfme/common';
import type {
Lang,

@@ -29,3 +39,5 @@ Size,

export {
generate,
BLANK_PDF,
HELVETICA,
isTextSchema,

@@ -40,2 +52,24 @@ isImageSchema,

validateBarcodeInput,
} from '@pdfme/common';
};
export type {
Lang,
Size,
Alignment,
SchemaType,
BarCodeType,
TextSchema,
ImageSchema,
BarcodeSchema,
Schema,
SchemaForUI,
Font,
BasePdf,
Template,
CommonProps,
GeneratorOptions,
GenerateProps,
UIOptions,
UIProps,
PreviewProps,
DesignerProps,
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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