Copy link to clipboard
Copied
Getting 'Fatal error ' as below when generating pdf using Adobe
pdfservices-sdk
version 2.2.2 Html to pdf operation
All validations successfully done. Beginning CreatePDF operation execution 2022-12-13 16:59:48.749 [XNIO-1 task-14] ERROR c.a.e.d.m.b.s.CreatePDFFromHTML - Exception encountered while executing operation com.adobe.pdfservices.operation.exception.ServiceApiException: description ='Fatal error, Please check logs for details.'; requestTrackingId='Y6GzQ0h7Wj1e2GAdWMuBVapadrRcvtwY'; statusCode=500; errorCode=UNKNOWN at com.adobe.pdfservices.operation.pdfops.CreatePDFOperation.execute(CreatePDFOperation.java:212) at com.anthem.emep.dckr.microsvc.bbbookletservice.service.CreatePDFFromHTML.generatePdf(CreatePDFFromHTML.java:68)
Copy link to clipboard
Copied
Can you share the HTML input you used?
Copy link to clipboard
Copied
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Adobe IO</title>
<script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
</head>
<body onload = "initial()">
<script type="text/javascript">
function initial()
{
var document = window.document;
document.getElementById("outline").innerHTML = String(window.json.outline);
}
</script>
<div>
<div>
<p id="outline"></p>
</div>
</div>
</body>
</html>
Copy link to clipboard
Copied
It looks like you probably also passed custom data too - can you share that?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
One thing I notice is that you don't have the required script tag, as documented here: https://developer-stage.adobe.com/document-services/docs/overview/pdf-services-api/howtos/create-pdf...
Specifically: <script src='./json.js' type='text/javascript'></script>
Copy link to clipboard
Copied
I can see the script tag in attached html, attached the screenshot for the script tag, and this html works perfectlt just with this data it's not working, just wondering it's because of some limitation like inser/replace or page limitation it has to generate pdf
Copy link to clipboard
Copied
Um, I think you attached a screen shot of your credentials. I'd edit the post asap.
The script tag is NOT visible in the first post above.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I didn't know I had the ability - but I just removed your attachment.
I'm looking at your second attachment, you still do NOT have the script tag. To be clear, it must be this: <script src='./json.js' type='text/javascript'></script>
Copy link to clipboard
Copied
<script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
I'm having above line in html file
Copy link to clipboard
Copied
Please read what I've said multiple times. You need a script tag that points to json.js. You see my posts saying that, right?
Copy link to clipboard
Copied
Okay, can you clear my question why same html working for same data but it's not working only for the attached data all together
Copy link to clipboard
Copied
It shouldn't be working at all w/o the script tag. That's why I'm asking you to add it.
Copy link to clipboard
Copied
Tried with script pointing to json.js with the attached data, getting below error
3-01-03 17:28:09.874 [XNIO-1 task-7] ERROR c.a.e.d.m.b.s.CreatePDFFromHTML -
Exception encountered while executing operation
com.adobe.pdfservices.operation.exception.ServiceApiException: description ='Fatal error, Please check logs for details.'; requestTrackingId='wfVqk8fERUNpp6Y7HFWWU4UqpoXAyHCC'; statusCode=500; errorCode=UNKNOWN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Adobe IO</title>
<script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
</head>
<body onload = "initial()">
<script src="./json.js"></script>
<script type="text/javascript">
function initial()
{
var document = window.document;
document.getElementById("outline").innerHTML = String(window.json.outline);
}
</script>
<div>
<div>
<p id="outline"></p>
</div>
</div>
</body>
</html>
Copy link to clipboard
Copied
Ok, I thought it might be size, but I'm having trouble getting this working even when I've trimmed your HTML. Reporting internally.
Copy link to clipboard
Copied
The Jsondata1.json file that you attached isn't JSON. It's HTML.
Copy link to clipboard
Copied
Joel, grab the earlier attachment. It was right. Trust me, I checked it. 😉