@pdfme/ui
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -9,3 +9,3 @@ /* | ||
* @name @pdfme/ui | ||
* @version 1.0.3 | Thu Mar 10 2022 | ||
* @version 1.0.4 | Wed Mar 16 2022 | ||
* @author hand-dot | ||
@@ -12,0 +12,0 @@ * @license MIT |
@@ -22,2 +22,3 @@ import { Template, SchemaForUI, Size } from '@pdfme/common'; | ||
export declare const readFiles: (files: FileList | null, type: 'text' | 'dataURL' | 'arrayBuffer') => Promise<string | ArrayBuffer>; | ||
export declare const px2mm: (px: number) => number; | ||
export declare const getPdfPageSizes: (pdfBlob: Blob) => Promise<{ | ||
@@ -24,0 +25,0 @@ height: number; |
{ | ||
"name": "@pdfme/ui", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": "hand-dot", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -236,2 +236,9 @@ // @ts-ignore | ||
export const px2mm = (px: number) => { | ||
// http://www.unitconversion.org/typography/millimeters-to-pixels-y-conversion.html | ||
const mmRatio = 0.264583333; | ||
return parseFloat(String(px)) * mmRatio; | ||
}; | ||
export const getPdfPageSizes = async (pdfBlob: Blob) => { | ||
@@ -238,0 +245,0 @@ const url = URL.createObjectURL(pdfBlob); |
Sorry, the diff of this file is too big to display
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9928948
14066