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

Create PDF from dynamic HTML

Community Beginner ,
Aug 21, 2023 Aug 21, 2023

Hi Team, I need to create pdf from dynamic html.
So I have HTML file, inline CSS and json data.

How I can  use new rest API's to create PDF.
I tried following steps - 
1.Create a zip file from html, css and json file.

2.Generate access token.

2.Upload them to adobe cloud and get asset ID.

3.Call api- https://pdf-services-ue1.adobe.io/operation/htmltopdf

but it's not working.

Can any one help me on this? As new rest api documentation is not clear

TOPICS
PDF Services API
2.4K
Translate
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 Beginner ,
Jul 15, 2024 Jul 15, 2024

Hi 

can you please help us?
Translate
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 ,
Jul 17, 2024 Jul 17, 2024
LATEST

I tried your code and modified it with my client id and secret. I modified the source zip as well. It worked just fine.

Translate
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 Beginner ,
Jul 15, 2024 Jul 15, 2024

Hi Raymond, it's blocking us in PROD environment. can you please help?

Translate
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 ,
Jul 15, 2024 Jul 15, 2024

I'm working with someone else who sent me some sample HTML, but no data. If you can quickly send me a MINIMAL example that includes the HTML + all assets, ie, the zip, and your data, I will try to reproduce.

Translate
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 ,
Jul 15, 2024 Jul 15, 2024

Query, the other person's HTML is missing this:

 

 <script src='./json.js' type='text/javascript'></script>

 

Can you confirm if your templates have this?

Translate
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 ,
Jul 15, 2024 Jul 15, 2024

Also, I'm assuming you have the same issue as the other thread. Looking at your original post, you only said:

 

"but it's not working."

 

Can you describe HOW it is not working?

Translate
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