Added ability to generat PDF on test email page.
This commit is contained in:
@@ -75,15 +75,15 @@ export default async function RenderTemplate(
|
||||
|
||||
if (!renderAsHtml) {
|
||||
render.download();
|
||||
var html =
|
||||
"<html>" +
|
||||
"<style>html,body {padding:0;margin:0;} iframe {width:100%;height:100%;border:0}</style>" +
|
||||
"<body>" +
|
||||
'<iframe type="application/pdf" src="' +
|
||||
render.toDataURI() +
|
||||
'"></iframe>' +
|
||||
"</body></html>";
|
||||
displayTemplateInWindowNoprint(html);
|
||||
// var html =
|
||||
// "<html>" +
|
||||
// "<style>html,body {padding:0;margin:0;} iframe {width:100%;height:100%;border:0}</style>" +
|
||||
// "<body>" +
|
||||
// '<iframe type="application/pdf" src="' +
|
||||
// render.toDataURI() +
|
||||
// '"></iframe>' +
|
||||
// "</body></html>";
|
||||
// displayTemplateInWindowNoprint(html);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(render.toString());
|
||||
@@ -133,6 +133,6 @@ export const GenerateDocument = async (template, messageOptions, sendType) => {
|
||||
})
|
||||
);
|
||||
} else {
|
||||
displayTemplateInWindow(await RenderTemplate(template, bodyshop));
|
||||
await RenderTemplate(template, bodyshop);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user