Convert chm document to PDF, only catalogue has content

When I use aspose words to convert chm documents to PDF, I found that the generated PDF, which only the content of the directory, please ask, how do I convert chm to PDF it, I hope that each according to the directory to generate multiple files, thank you!

Document doc = new Document("input.chm");
doc.save("Output.pdf");

allchms.zip (3.2 MB)

@yjsdfsdf As I can see the input CHM is damaged, there is no other content other than catalog. All pages are unreachable:

try this file
input.zip (3.1 MB)

@yjsdfsdf This is the same CHM file. I see the same picture with this file, no pages are reachable.

Very strange, please, after you unzip it, is it 3165KB, are you on top of a windows 10 computer, can you trouble someone else to try it, thank you very much!

@yjsdfsdf Yes, after unzipping the file it’s size is 3165KB. And yes, I have tested on Windows 10 PC. I have tested on another Windows 10 machine and the result is the same.

@yjsdfsdf It is required to change system locale to Chinese to open this CHM file.

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): WORDSNET-26257

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.

can you try na similar file, English can also be, I now want to get is, will be a chm file, converted to multiple files, because the chm file is a directory, I hope that each directory is converted to a file, thank you!

I mean, if I use the above code to convert chm file to PDF, I get one file, but I need to generate multiple files depending on the directory, what should I do, thanks!

@yjsdfsdf I have logged as feature request WORDSNET-26260 to add a CHM load option to import each CHM page as a separate section. In this case you will be easily split the document and export each section to PDF. Will this satisfy your requirements?

@yjsdfsdf We have completed analyzing WORDSNET-26257 issue and concluded it is not a bug. If you convert the CHM document to DOCX, you’ll see that all text is actually imported into the resulting document but it is marked as hidden (Font.Hidden=true). This happens because in the source document all text is enclosed in a hidden div element:

<DIV class="rich_media_content " id="js_content" style="visibility: hidden;">
<!-- All text is here. -->
</DIV>

When the CHM document is opened in MS HTML Help viewer, JavaScript executes code that makes the enclosing div visible:

document.getElementById("js_content").style.visibility = "visible";

However, since Aspose.Words doesn’t support JavaScript, the enclosing div remains hidden during conversion.

The issues you have found earlier (filed as WORDSNET-26257) have been fixed in this Aspose.Words for .NET 24.1 update also available on NuGet.