Free Support Forum -

Convert PDF to responsive HTML

I need to generate html out of pdf document and ive used api method “PutPdfInRequestToHtml” for the same.

I tried both with fixedLayout and without fixedLayout, however, i have issues with both the outputs

  1. With fixedLayout - It uses styles “left and top” which has 2 major issues…
    i. It is not responsive and
    ii. In a paragraph, line ends with character exactly as in pdf, instead of continuing the paragraph on the same line for a wider screen… may be because it considers each line as a paragraph tag…

  2. Without fixedLayout - the resulting html is completely misaligned…



Thanks for your inquiry. We will appreciate it if you please share your sample input PDF document along with the problematic output HTML and expected HTML document. It will help us to investigate your issue exactly and guide you accordingly.

P.S: you can attach the documents as zip file.


FixedLayout True
Test.pdf as input PDF document and as output HTML
Test.pdf (127.1 KB) (116.9 KB)

FixedLayout False
Test-en.pdf as input PDF document and as output HTML (115.9 KB)
Test-en.pdf (142.0 KB)



Thanks for sharing your input and output documents here. We are looking into these and will guide you accordingly. Meanwhile, please share your expected HTML document as well it will help us to understand your requirements exactly.


Attached is somewhat expected HTML document… The expectation is that the paragraphs are displayed properly in continuation and should be responsive. (9.3 KB)



Thanks for sharing expected HTML document. I am investigating the PutPdfInRequestToHtml API method behavior and will update you soon.

Meanwhile, you may try Aspose.Words Cloud ConvertDocument API. (17.2 KB)

curl -X PUT "" 
-H "accept: application/xml" 
-H "authorization: Bearer [Access_Token]" 
-H "Content-Type: multipart/form-data" 
-F "File=@C:/Temp/Test-en.pdf"

Thanks Tilal. I’ve tried what you have suggested and it is working wee for me now. Really appreciate you help at the right time…

Thanks once again.

1 Like

Hi Tilal,

I’m sure this Aspose.word convertDocument was working for pdf files yesterday, but today it is giving an error.

Please see attached screenshot…

image.png (79.8 KB)

Can you please help me?


Thanks for your inquiry. I’m afraid, I’m unable to replicate the error. It seems you are using old SDK 19.2. Please use latest SDK version, hopefully it will help you to resolve the issue.

@tilal.ahmad - Tried attached .pdf file but the html output is improper. Can you please check?
552496-issue.pdf (131.8 KB)

Tried Aspose.Words Cloud api and here is the response html. (23.3 KB)


We are sorry for your inconvenience. We have tested the scenario with your shared PDF document and noticed the reported issue, so logged a ticket WORDSCLOUD-979 in our issue tracking system for further investigation. We will notify you as soon as it is resolved.