7px
06/08/2022, 2:09 AMrender
module's xmlToPdf
? For context, I made a test suitelet that ideally renders a basic PDF page that loads an image with the <img>
tag, with the entire xml template as a template literal in the script. The src for the <img>
tag points to an expression, and I can't seem to get it to render an image in File Cabinet that's already been marked as "Available without Login" on and off multiple times.
I've attached a snippet of the test script here. I'm still unsure if the issue is the url I'm plugging in, since I've tried plugging in the public url on the image's File Cabinet page, as well as swapping out the ampersand with the Freemarker-friendly &
replacement. Any and all input would be very appreciated, thanks!7px
06/08/2022, 2:11 AMvar xml1 = `<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd"> <pdf> <head> </head>
<body padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
<table> <tr>
<td>Pic goes here: <div overflow="visible">
<img src="${sig}" style="align:center; width: 100%; height: 100%;" />
</div></td>
</tr>
</table>
</body>
</pdf>
`;
try {
var pdfFile = render.xmlToPdf({ xmlString: xml1 });
context.response.writeFile(pdfFile);
} catch (e) {
log.debug({
title:"why",
details:e
});
context.response.write(xml1);
battk
06/08/2022, 2:16 AMbattk
06/08/2022, 2:26 AMbattk
06/08/2022, 2:27 AM7px
06/08/2022, 3:11 AM