Does anyone have some suggestions for troubleshoot...
# suitescript
s
Does anyone have some suggestions for troubleshooting the pdf rendering engine when trying to render multiple PDFs together. This is the error I'm getting: {"type":"error.SuiteScriptError","name":"USER_ERROR","message":"Error Parsing XML: //xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf","id":"","stack":["Error\n at combinePdfsWithXml (/SuiteScripts/rl-packing-slip-generator.js29742)\n at Object.post (/SuiteScripts/rl-packing-slip-generator.js4433)"],"cause":{"type":"internal error","code":"USER_ERROR","details":"Error Parsing XML: //xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf","userEvent":null,"stackTrace":["Error\n at combinePdfsWithXml (/SuiteScripts/rl-packing-slip-generator.js29742)\n at Object.post (/SuiteScripts/rl-packing-slip-generator.js4433)"],"notifyOff":false},"notifyOff":false,"userFacing":true} This is what the template XML looks like that it is trying to render:
Copy code
<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdfset>
  <pdf src="<https://xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7901&c=xxxxxxxxxx&h=_ekndKfcsGcfW9OA3F270Vh_ZprbeZ8iUBD6ZovktckNAN8c&_xt=.pdf>" />
  <pdf src="<https://xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf>" />
</pdfset>
I have generated the files as available without login. Any suggestions on what is wrong here?
a
have you tried having suitescript parse just the 2nd file by itself? I'd want to determine if there's a problem with parsing the "5UP" file itself, vs a problem with merging the two files all I can say for sure based off the info provided is that it can't parse the XML of the two PDFs together
👍 1
s
Sure. I will give that a try and let you know. Thanks for the response.
a
if it can't parse just the 2nd file... then you're going to have to revisit how you're creating that file if the 2nd file is fine by itself then the issue is with the merge and I'd look for any naming conflicts between the two, it can't merge them if there's a conflict
👍 1
image.png
s
Okay. I figured out the issue. I had forgotten to check if the files I was trying to merge are marked as "isOnline". It's now working and I put some scripting in to make sure the specific files are set to be available online.
🙌 2