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

Getting "index.html doesn't exist in archive" when creating PDF from static html

New Here ,
Apr 12, 2024 Apr 12, 2024

I am extremely frustrated at this point. There must be an absolute gaping hole in the documentation and examples for this. I am using pdfservices-sdk version 3.5.1. I then followed this example from the ADOBE website. 

However, no matter what I do I get this error 

com.adobe.pdfservices.operation.exception.ServiceApiException: description ='index.html doesn't exist in archive.; requestId=341e7228-c0f5-4d5f-8fe2-bb1cd2a85587'; requestTrackingId='341e7228-c0f5-4d5f-8fe2-bb1cd2a85587'; statusCode=400; errorCode=MISSING_INDEX_HTML
	at com.adobe.pdfservices.operation.internal.api.PlatformApi.statusPoll(PlatformApi.java:115)
	at com.adobe.pdfservices.operation.pdfops.CreatePDFOperation.execute(CreatePDFOperation.java:209)

 

The error is utter nonesense. I have created the most basic barebones example and it still tells me the file doesn't exist. It seems impossible. I mean the example I'm using its absolutely stripped down and matches to the T the requirements. I have a 1Kb file named 

index.html

with the following content

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Test</title>
</head>

<body>
<h1>TEST</h1>
</body>

</html>

 i then zip it and plug in the path to the example and I get that error. It's one of those things thats so egregious and inexplicable ive got no idea where I would even go from here. Any help would greatly, greatly be appreciated.

536
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 Expert ,
Apr 12, 2024 Apr 12, 2024

Are you zipping the folder that index.html is in or are you zipping index.html?

 

index.html must be at the top level of the .zip file. 

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
New Here ,
Apr 12, 2024 Apr 12, 2024

hey joel, yes that is correct. It's kind of hard to messed this up. If you're zipping anything in windows its going to create a zip folder. I have a zipped directory called "example.zip". Inside that directory is the html file called "index.html". Extremely basic.

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
New Here ,
Apr 12, 2024 Apr 12, 2024

I have attached the actual zip to the github issue i created here https://github.com/adobe/pdfservices-java-sdk-samples/issues/50

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 Expert ,
Apr 13, 2024 Apr 13, 2024

index.hrml has to be at the top level of the .zip file, not in a fiolder. See the attachment on your github issue. I can't attach zip files here.

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
New Here ,
Apr 15, 2024 Apr 15, 2024
LATEST

Thanks Joel you are correct. That was a dumb mistake on my part, I appreciate u taking the time to 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
Resources