Closed Janviba911 closed 1 year ago
I am using react-native-view-shot for snap and sent that uri to the react-native-print. Please check below code:
Version "react-native-print": "^0.6.0",
Code await print({ html: wrapHtmlforFileOuput({ content:`, type: 'image' }) });
await print({ html: wrapHtmlforFileOuput({ content:
export function wrapHtmlforFileOuput({ type = 'pdf', content = "", style = "" }: { type?: "pdf" | "image", content?: string, style?: string }): string { const finalHtml = ` <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<body style="-webkit-text-size-adjust: 100%; user-select: none;"> ${content} </body> </html>`; return finalHtml;
}`
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am using react-native-view-shot for snap and sent that uri to the react-native-print. Please check below code:
Version "react-native-print": "^0.6.0",
Code
await print({ html: wrapHtmlforFileOuput({ content:
`, type: 'image' }) });export function wrapHtmlforFileOuput({ type = 'pdf', content = "", style = "" }: { type?: "pdf" | "image", content?: string, style?: string }): string { const finalHtml = ` <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
${type === 'pdf' ? style : ``}}`