expo-print 11.0.4 → 11.1.0
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.
- package/CHANGELOG.md +1 -9
- package/android/build.gradle +2 -2
- package/build/Print.d.ts +2 -1
- package/build/Print.js +2 -1
- package/build/Print.js.map +1 -1
- package/build/Print.types.d.ts +19 -9
- package/build/Print.types.js.map +1 -1
- package/ios/EXPrint.xcframework/Info.plist +5 -5
- package/ios/EXPrint.xcframework/ios-arm64/EXPrint.framework/EXPrint +0 -0
- package/ios/EXPrint.xcframework/ios-arm64/EXPrint.framework/Info.plist +0 -0
- package/ios/EXPrint.xcframework/ios-arm64_x86_64-simulator/EXPrint.framework/EXPrint +0 -0
- package/ios/EXPrint.xcframework/ios-arm64_x86_64-simulator/EXPrint.framework/Info.plist +0 -0
- package/package.json +7 -6
- package/src/Print.ts +2 -1
- package/src/Print.types.ts +19 -9
package/CHANGELOG.md
CHANGED
|
@@ -10,20 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 11.0
|
|
13
|
+
## 11.1.0 — 2021-12-03
|
|
14
14
|
|
|
15
15
|
### 🐛 Bug fixes
|
|
16
16
|
|
|
17
17
|
- Fix page-breaks and margins not supported on iOS ([#14383](https://github.com/expo/expo/pull/14802) by [@cruzach](https://github.com/IjzerenHein))
|
|
18
18
|
|
|
19
|
-
## 11.0.3 — 2021-10-21
|
|
20
|
-
|
|
21
|
-
_This version does not introduce any user-facing changes._
|
|
22
|
-
|
|
23
|
-
## 11.0.2 — 2021-10-15
|
|
24
|
-
|
|
25
|
-
_This version does not introduce any user-facing changes._
|
|
26
|
-
|
|
27
19
|
## 11.0.1 — 2021-10-01
|
|
28
20
|
|
|
29
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '11.0
|
|
6
|
+
version = '11.1.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
@@ -57,7 +57,7 @@ android {
|
|
|
57
57
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
58
58
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
|
59
59
|
versionCode 27
|
|
60
|
-
versionName "11.0
|
|
60
|
+
versionName "11.1.0"
|
|
61
61
|
}
|
|
62
62
|
lintOptions {
|
|
63
63
|
abortOnError false
|
package/build/Print.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ export declare const Orientation: OrientationType;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function printAsync(options: PrintOptions): Promise<void>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Chooses a printer that can be later used in `printAsync`
|
|
18
18
|
* @return A promise which fulfils with an object containing `name` and `url` of the selected printer.
|
|
19
|
+
* @platform ios
|
|
19
20
|
*/
|
|
20
21
|
export declare function selectPrinterAsync(): Promise<Printer>;
|
|
21
22
|
/**
|
package/build/Print.js
CHANGED
|
@@ -32,8 +32,9 @@ export async function printAsync(options) {
|
|
|
32
32
|
}
|
|
33
33
|
// @needsAudit
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Chooses a printer that can be later used in `printAsync`
|
|
36
36
|
* @return A promise which fulfils with an object containing `name` and `url` of the selected printer.
|
|
37
|
+
* @platform ios
|
|
37
38
|
*/
|
|
38
39
|
export async function selectPrinterAsync() {
|
|
39
40
|
if (ExponentPrint.selectPrinter) {
|
package/build/Print.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Print.js","sourceRoot":"","sources":["../src/Print.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAW5C,2BAA2B;AAC3B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAoB,aAAa,CAAC,WAAW,CAAC;AAEtE,cAAc;AACd;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAqB;IACpD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC3C;IACD,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;QACzF,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IACD,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KACzF;IACD,IAAI,OAAO,CAAC,kBAAkB,KAAK,SAAS,EAAE;QAC5C,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;KAC9F;IACD,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,cAAc;AACd
|
|
1
|
+
{"version":3,"file":"Print.js","sourceRoot":"","sources":["../src/Print.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAW5C,2BAA2B;AAC3B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAoB,aAAa,CAAC,WAAW,CAAC;AAEtE,cAAc;AACd;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAqB;IACpD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC3C;IACD,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;QACzF,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;KACjE;IACD,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KACzF;IACD,IAAI,OAAO,CAAC,kBAAkB,KAAK,SAAS,EAAE;QAC5C,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;KAC9F;IACD,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,aAAa,CAAC,aAAa,EAAE;QAC/B,OAAO,MAAM,aAAa,CAAC,aAAa,EAAE,CAAC;KAC5C;IAED,MAAM,IAAI,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;AAC/D,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,UAA4B,EAAE;IACnE,OAAO,MAAM,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport ExponentPrint from './ExponentPrint';\nimport {\n FilePrintOptions,\n FilePrintResult,\n OrientationType,\n PrintOptions,\n Printer,\n} from './Print.types';\n\nexport { FilePrintOptions, FilePrintResult, OrientationType, PrintOptions, Printer };\n\n// @needsAudit @docsMissing\n/**\n * The orientation of the printed content.\n */\nexport const Orientation: OrientationType = ExponentPrint.Orientation;\n\n// @needsAudit\n/**\n * Prints a document or HTML, on web this prints the HTML from the page.\n * > Note: On iOS, printing from HTML source doesn't support local asset URLs (due to `WKWebView`\n * > limitations). As a workaround you can use inlined base64-encoded strings.\n * > See [this comment](https://github.com/expo/expo/issues/7940#issuecomment-657111033) for more details.\n * @param options A map defining what should be printed.\n * @return Resolves to an empty `Promise` if printing started.\n */\nexport async function printAsync(options: PrintOptions): Promise<void> {\n if (Platform.OS === 'web') {\n return await ExponentPrint.print(options);\n }\n if (!options.uri && !options.html && Platform.OS === 'ios' && !options.markupFormatterIOS) {\n throw new Error('Must provide either `html` or `uri` to print');\n }\n if (options.uri && options.html) {\n throw new Error('Must provide exactly one of `html` and `uri` but both were specified');\n }\n if (options.markupFormatterIOS !== undefined) {\n console.warn('The markupFormatterIOS option is deprecated. Use useMarkupFormatter instead.');\n }\n return await ExponentPrint.print(options);\n}\n\n// @needsAudit\n/**\n * Chooses a printer that can be later used in `printAsync`\n * @return A promise which fulfils with an object containing `name` and `url` of the selected printer.\n * @platform ios\n */\nexport async function selectPrinterAsync(): Promise<Printer> {\n if (ExponentPrint.selectPrinter) {\n return await ExponentPrint.selectPrinter();\n }\n\n throw new UnavailabilityError('Print', 'selectPrinterAsync');\n}\n\n// @needsAudit\n/**\n * Prints HTML to PDF file and saves it to [app's cache directory](./filesystem/#filesystemcachedirectory).\n * On Web this method opens the print dialog.\n * @param options A map of print options.\n */\nexport async function printToFileAsync(options: FilePrintOptions = {}): Promise<FilePrintResult> {\n return await ExponentPrint.printToFileAsync(options);\n}\n"]}
|
package/build/Print.types.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ export declare type PrintOptions = {
|
|
|
2
2
|
/**
|
|
3
3
|
* URI of a PDF file to print. Remote, local (ex. selected via `DocumentPicker`) or base64 data URI
|
|
4
4
|
* starting with `data:application/pdf;base64,`. This only supports PDF, not other types of
|
|
5
|
-
* document (e.g. images).
|
|
5
|
+
* document (e.g. images).
|
|
6
|
+
* @platform ios
|
|
6
7
|
*/
|
|
7
8
|
uri?: string;
|
|
8
9
|
/**
|
|
9
|
-
* HTML string to print.
|
|
10
|
+
* HTML string to print.
|
|
11
|
+
* @platform android
|
|
12
|
+
* @platform ios
|
|
10
13
|
*/
|
|
11
14
|
html?: string;
|
|
12
15
|
/**
|
|
@@ -20,27 +23,32 @@ export declare type PrintOptions = {
|
|
|
20
23
|
*/
|
|
21
24
|
height?: number;
|
|
22
25
|
/**
|
|
23
|
-
* URL of the printer to use. Returned from `selectPrinterAsync`.
|
|
26
|
+
* URL of the printer to use. Returned from `selectPrinterAsync`.
|
|
27
|
+
* @platform ios
|
|
24
28
|
*/
|
|
25
29
|
printerUrl?: string;
|
|
26
30
|
/**
|
|
27
|
-
*
|
|
31
|
+
* Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)
|
|
28
32
|
* instead of WebView, but it doesn't display images.
|
|
33
|
+
* @platform ios
|
|
29
34
|
*/
|
|
30
35
|
useMarkupFormatter?: boolean;
|
|
31
36
|
/**
|
|
32
37
|
* @deprecated
|
|
33
|
-
*
|
|
38
|
+
* This argument is deprecated, use `useMarkupFormatter` instead.
|
|
34
39
|
* Might be removed in the future releases.
|
|
40
|
+
* @platform ios
|
|
35
41
|
*/
|
|
36
42
|
markupFormatterIOS?: string;
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
44
|
+
* The orientation of the printed content, `Print.Orientation.portrait`
|
|
39
45
|
* or `Print.Orientation.landscape`.
|
|
46
|
+
* @platform ios
|
|
40
47
|
*/
|
|
41
48
|
orientation?: OrientationType['portrait'] | OrientationType['landscape'];
|
|
42
49
|
/**
|
|
43
|
-
*
|
|
50
|
+
* Page margins for the printed document.
|
|
51
|
+
* @platform ios
|
|
44
52
|
*/
|
|
45
53
|
margins?: PageMargins;
|
|
46
54
|
};
|
|
@@ -73,8 +81,9 @@ export declare type FilePrintOptions = {
|
|
|
73
81
|
*/
|
|
74
82
|
html?: string;
|
|
75
83
|
/**
|
|
76
|
-
*
|
|
84
|
+
* Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)
|
|
77
85
|
* instead of WebView, but it doesn't display images.
|
|
86
|
+
* @platform ios
|
|
78
87
|
*/
|
|
79
88
|
useMarkupFormatter?: boolean;
|
|
80
89
|
/**
|
|
@@ -88,7 +97,8 @@ export declare type FilePrintOptions = {
|
|
|
88
97
|
*/
|
|
89
98
|
height?: number;
|
|
90
99
|
/**
|
|
91
|
-
*
|
|
100
|
+
* Page margins for the printed document.
|
|
101
|
+
* @platform ios
|
|
92
102
|
*/
|
|
93
103
|
margins?: PageMargins;
|
|
94
104
|
/**
|
package/build/Print.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Print.types.js","sourceRoot":"","sources":["../src/Print.types.ts"],"names":[],"mappings":"","sourcesContent":["// @needsAudit\nexport type PrintOptions = {\n /**\n * URI of a PDF file to print. Remote, local (ex. selected via `DocumentPicker`) or base64 data URI\n * starting with `data:application/pdf;base64,`. This only supports PDF, not other types of\n * document (e.g. images)
|
|
1
|
+
{"version":3,"file":"Print.types.js","sourceRoot":"","sources":["../src/Print.types.ts"],"names":[],"mappings":"","sourcesContent":["// @needsAudit\nexport type PrintOptions = {\n /**\n * URI of a PDF file to print. Remote, local (ex. selected via `DocumentPicker`) or base64 data URI\n * starting with `data:application/pdf;base64,`. This only supports PDF, not other types of\n * document (e.g. images).\n * @platform ios\n */\n uri?: string;\n /**\n * HTML string to print.\n * @platform android\n * @platform ios\n */\n html?: string;\n /**\n * Width of the single page in pixels. Defaults to `612` which is a width of US Letter paper\n * format with 72 PPI. **Available only with `html` option.**\n */\n width?: number;\n /**\n * Height of the single page in pixels. Defaults to `792` which is a height of US Letter paper\n * format with 72 PPI. **Available only with `html` option.**\n */\n height?: number;\n /**\n * URL of the printer to use. Returned from `selectPrinterAsync`.\n * @platform ios\n */\n printerUrl?: string;\n /**\n * Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)\n * instead of WebView, but it doesn't display images.\n * @platform ios\n */\n useMarkupFormatter?: boolean;\n /**\n * @deprecated\n * This argument is deprecated, use `useMarkupFormatter` instead.\n * Might be removed in the future releases.\n * @platform ios\n */\n markupFormatterIOS?: string;\n /**\n * The orientation of the printed content, `Print.Orientation.portrait`\n * or `Print.Orientation.landscape`.\n * @platform ios\n */\n orientation?: OrientationType['portrait'] | OrientationType['landscape'];\n /**\n * Page margins for the printed document.\n * @platform ios\n */\n margins?: PageMargins;\n};\n\n// @needsAudit\nexport type Printer = {\n /**\n * Name of the printer.\n */\n name: string;\n /**\n * URL of the printer.\n */\n url: string;\n};\n\n// @needsAudit\n/**\n * The possible values of orientation for the printed content.\n */\nexport interface OrientationType {\n portrait: string;\n landscape: string;\n}\n\n// @needsAudit\nexport type PageMargins = {\n top: number;\n right: number;\n bottom: number;\n left: number;\n};\n\n// @docsMissing\nexport type FilePrintOptions = {\n /**\n * HTML string to print into PDF file.\n */\n html?: string;\n /**\n * Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)\n * instead of WebView, but it doesn't display images.\n * @platform ios\n */\n useMarkupFormatter?: boolean;\n /**\n * Width of the single page in pixels. Defaults to `612` which is a width of US Letter paper\n * format with 72 PPI.\n */\n width?: number;\n /**\n * Height of the single page in pixels. Defaults to `792` which is a height of US Letter paper\n * format with 72 PPI.\n */\n height?: number;\n /**\n * Page margins for the printed document.\n * @platform ios\n */\n margins?: PageMargins;\n /**\n * Whether to include base64 encoded string of the file in the returned object.\n */\n base64?: boolean;\n};\n\n// @needsAudit\nexport type FilePrintResult = {\n /**\n * A URI to the printed PDF file.\n */\n uri: string;\n /**\n * Number of pages that were needed to render given content.\n */\n numberOfPages: number;\n /**\n * Base64 encoded string containing the data of the PDF file. **Available only if `base64`\n * option is truthy**. It doesn't include data URI prefix `data:application/pdf;base64,`.\n */\n base64?: string;\n};\n"]}
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>EXPrint.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
-
<string>x86_64</string>
|
|
16
15
|
</array>
|
|
17
16
|
<key>SupportedPlatform</key>
|
|
18
17
|
<string>ios</string>
|
|
19
|
-
<key>SupportedPlatformVariant</key>
|
|
20
|
-
<string>simulator</string>
|
|
21
18
|
</dict>
|
|
22
19
|
<dict>
|
|
23
20
|
<key>LibraryIdentifier</key>
|
|
24
|
-
<string>ios-
|
|
21
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
25
22
|
<key>LibraryPath</key>
|
|
26
23
|
<string>EXPrint.framework</string>
|
|
27
24
|
<key>SupportedArchitectures</key>
|
|
28
25
|
<array>
|
|
29
26
|
<string>arm64</string>
|
|
27
|
+
<string>x86_64</string>
|
|
30
28
|
</array>
|
|
31
29
|
<key>SupportedPlatform</key>
|
|
32
30
|
<string>ios</string>
|
|
31
|
+
<key>SupportedPlatformVariant</key>
|
|
32
|
+
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
</array>
|
|
35
35
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-print",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Provides an API for iOS (AirPrint) and Android printing functionality.",
|
|
5
5
|
"main": "build/Print.js",
|
|
6
6
|
"types": "build/Print.d.ts",
|
|
@@ -31,13 +31,14 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/print/",
|
|
33
33
|
"jest": {
|
|
34
|
-
"preset": "expo-module-scripts
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"expo-modules-core": "~0.4.7"
|
|
34
|
+
"preset": "expo-module-scripts"
|
|
38
35
|
},
|
|
36
|
+
"dependencies": {},
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"expo-module-scripts": "^2.0.0"
|
|
41
39
|
},
|
|
42
|
-
"
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"expo": "*"
|
|
42
|
+
},
|
|
43
|
+
"gitHead": "2e5c6983b86d5ecfca028ba64002897d8adc2cc4"
|
|
43
44
|
}
|
package/src/Print.ts
CHANGED
|
@@ -45,8 +45,9 @@ export async function printAsync(options: PrintOptions): Promise<void> {
|
|
|
45
45
|
|
|
46
46
|
// @needsAudit
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Chooses a printer that can be later used in `printAsync`
|
|
49
49
|
* @return A promise which fulfils with an object containing `name` and `url` of the selected printer.
|
|
50
|
+
* @platform ios
|
|
50
51
|
*/
|
|
51
52
|
export async function selectPrinterAsync(): Promise<Printer> {
|
|
52
53
|
if (ExponentPrint.selectPrinter) {
|
package/src/Print.types.ts
CHANGED
|
@@ -3,11 +3,14 @@ export type PrintOptions = {
|
|
|
3
3
|
/**
|
|
4
4
|
* URI of a PDF file to print. Remote, local (ex. selected via `DocumentPicker`) or base64 data URI
|
|
5
5
|
* starting with `data:application/pdf;base64,`. This only supports PDF, not other types of
|
|
6
|
-
* document (e.g. images).
|
|
6
|
+
* document (e.g. images).
|
|
7
|
+
* @platform ios
|
|
7
8
|
*/
|
|
8
9
|
uri?: string;
|
|
9
10
|
/**
|
|
10
|
-
* HTML string to print.
|
|
11
|
+
* HTML string to print.
|
|
12
|
+
* @platform android
|
|
13
|
+
* @platform ios
|
|
11
14
|
*/
|
|
12
15
|
html?: string;
|
|
13
16
|
/**
|
|
@@ -21,27 +24,32 @@ export type PrintOptions = {
|
|
|
21
24
|
*/
|
|
22
25
|
height?: number;
|
|
23
26
|
/**
|
|
24
|
-
* URL of the printer to use. Returned from `selectPrinterAsync`.
|
|
27
|
+
* URL of the printer to use. Returned from `selectPrinterAsync`.
|
|
28
|
+
* @platform ios
|
|
25
29
|
*/
|
|
26
30
|
printerUrl?: string;
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
32
|
+
* Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)
|
|
29
33
|
* instead of WebView, but it doesn't display images.
|
|
34
|
+
* @platform ios
|
|
30
35
|
*/
|
|
31
36
|
useMarkupFormatter?: boolean;
|
|
32
37
|
/**
|
|
33
38
|
* @deprecated
|
|
34
|
-
*
|
|
39
|
+
* This argument is deprecated, use `useMarkupFormatter` instead.
|
|
35
40
|
* Might be removed in the future releases.
|
|
41
|
+
* @platform ios
|
|
36
42
|
*/
|
|
37
43
|
markupFormatterIOS?: string;
|
|
38
44
|
/**
|
|
39
|
-
*
|
|
45
|
+
* The orientation of the printed content, `Print.Orientation.portrait`
|
|
40
46
|
* or `Print.Orientation.landscape`.
|
|
47
|
+
* @platform ios
|
|
41
48
|
*/
|
|
42
49
|
orientation?: OrientationType['portrait'] | OrientationType['landscape'];
|
|
43
50
|
/**
|
|
44
|
-
*
|
|
51
|
+
* Page margins for the printed document.
|
|
52
|
+
* @platform ios
|
|
45
53
|
*/
|
|
46
54
|
margins?: PageMargins;
|
|
47
55
|
};
|
|
@@ -82,8 +90,9 @@ export type FilePrintOptions = {
|
|
|
82
90
|
*/
|
|
83
91
|
html?: string;
|
|
84
92
|
/**
|
|
85
|
-
*
|
|
93
|
+
* Alternative to default option that uses [UIMarkupTextPrintFormatter](https://developer.apple.com/documentation/uikit/uimarkuptextprintformatter)
|
|
86
94
|
* instead of WebView, but it doesn't display images.
|
|
95
|
+
* @platform ios
|
|
87
96
|
*/
|
|
88
97
|
useMarkupFormatter?: boolean;
|
|
89
98
|
/**
|
|
@@ -97,7 +106,8 @@ export type FilePrintOptions = {
|
|
|
97
106
|
*/
|
|
98
107
|
height?: number;
|
|
99
108
|
/**
|
|
100
|
-
*
|
|
109
|
+
* Page margins for the printed document.
|
|
110
|
+
* @platform ios
|
|
101
111
|
*/
|
|
102
112
|
margins?: PageMargins;
|
|
103
113
|
/**
|