PDF convert to html

jar version: 23.4 jdk:version:1.8
I used the method of converting PDF to HTML to convert a PDF file to an HTML file, but all table elements within the PDF were recognized as div or svg tags by default. I would like to convert these elements to table tags only. How can I achieve this?

this is my code :`

            Document doc = new Document(pdfPath);
            HtmlSaveOptions conversionOptions = new HtmlSaveOptions();
            conversionOptions.setFixedLayout(true);
            conversionOptions.setConvertMarkedContentToLayers(true);
            conversionOptions.setSimpleTextboxModeGrouping(true);

            doc.save(htmlPath,conversionOptions);` 

C898C8A2-C212-4878-BB0F-892CF8483649.png (79.5 KB)
thanks very much

@machaolook,

I do not think there is an option for that because the conversion tries to achieve visual fidelity, not code fidelity.

Thank you for answering my question.
but the same file i use Convert PDF | Online and Free
The resulting conversion is different, and this is for the same page being converted.
The image below was converted from the same file using the website above, but the resulting output is inconsistent. What’s the reason for this difference?3914FAE2-212A-4b72-B5AC-EC26C8A93AE0.png (60.0 KB)

Thank you very much for your response.

@machaolook,

I do not belong to the dev team, but the dev teams are different for the APP and the API, So maybe that is the reason. But an option to achieve that using the API does not exist at the moment.

@machaolook

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-37758

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@machaolook

We would like to share with you that we already have received similar request in the past and related tickets have already been logged in our issue management system to look into feasibility of this feature. We have associated one of the tickets with this forum thread. As soon as this feature is investigated and implemented, you will receive a notification via this forum thread. Please be patient and spare us some time.

We are sorry for the inconvenience.