@pdfme/common 6.1.1-dev.4 → 6.1.1-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ export type PageOrientation = 'portrait' | 'landscape';
2
+ export declare const PAGE_SIZE_PRESETS: {
3
+ readonly A3: {
4
+ readonly width: 297;
5
+ readonly height: 420;
6
+ };
7
+ readonly A4: {
8
+ readonly width: 210;
9
+ readonly height: 297;
10
+ };
11
+ readonly A5: {
12
+ readonly width: 148;
13
+ readonly height: 210;
14
+ };
15
+ readonly A6: {
16
+ readonly width: 105;
17
+ readonly height: 148;
18
+ };
19
+ readonly B4: {
20
+ readonly width: 250;
21
+ readonly height: 353;
22
+ };
23
+ readonly B5: {
24
+ readonly width: 176;
25
+ readonly height: 250;
26
+ };
27
+ readonly B6: {
28
+ readonly width: 125;
29
+ readonly height: 176;
30
+ };
31
+ readonly Letter: {
32
+ readonly width: 215.9;
33
+ readonly height: 279.4;
34
+ };
35
+ readonly Legal: {
36
+ readonly width: 215.9;
37
+ readonly height: 355.6;
38
+ };
39
+ readonly Tabloid: {
40
+ readonly width: 279.4;
41
+ readonly height: 431.8;
42
+ };
43
+ };
44
+ export type PageSizePreset = keyof typeof PAGE_SIZE_PRESETS;
45
+ export type PageSize = PageSizePreset | {
46
+ width: number;
47
+ height: number;
48
+ };
49
+ export declare const resolvePageSize: (size?: PageSize, orientation?: PageOrientation) => {
50
+ width: number;
51
+ height: number;
52
+ };
53
+ export declare const detectPaperSize: (width: number, height: number, tolerance?: number) => `${PageSizePreset} ${PageOrientation}` | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/common",
3
- "version": "6.1.1-dev.4",
3
+ "version": "6.1.1-dev.7",
4
4
  "description": "TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!",
5
5
  "keywords": [
6
6
  "pdf",