• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Getting 'Fatal error ' when generating pdf using Adobe pdfservices-sdk

New Here ,
Dec 14, 2022 Dec 14, 2022

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)

Views

432

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 14, 2022 Dec 14, 2022

Copy link to clipboard

Copied

Can you share the HTML input you used?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 14, 2022 Dec 14, 2022

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>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 15, 2022 Dec 15, 2022

Copy link to clipboard

Copied

It looks like you probably also passed custom data too - can you share that?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 29, 2022 Dec 29, 2022

Copy link to clipboard

Copied

Attached data

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

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 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

yes I couldn't remove the attached credential,
Attached the screenshot for script tag in header and body

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

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>


 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 03, 2023 Jan 03, 2023

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2023 Jan 04, 2023

Copy link to clipboard

Copied

The Jsondata1.json file that you attached isn't JSON. It's HTML.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 04, 2023 Jan 04, 2023

Copy link to clipboard

Copied

LATEST

Joel, grab the earlier attachment. It was right. Trust me, I checked it. 😉

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources