Custom HTML Preview Integration with Docunut – Exporting Preview Images

Hello,

We’ve developed our own custom document previewer entirely in HTML, and we would like to integrate it with Docunut. Specifically, we are only looking to use Docunut’s functionality for generating preview images of documents.

Our goal is to load any type of document, have Docunut generate the preview images (as it does in its own viewer), and then use those image URLs in our custom preview UI. Ideally, we’d like to receive all image URLs upfront and then use lazy loading within our HTML script to load individual pages as needed.

Our question is: Is it possible to configure Docunut in .NET in such a way that we can continue using our own HTML preview interface, while leveraging Docunut’s backend functionality to retrieve preview images?

Additionally, we noticed that you offer an ExportToPng function. However, the documentation isn’t entirely clear on how to use this. Could you possibly provide an example or a brief explanation of how this function works?

Best regards,
Bilal2412

Hi @Bilal2412,

Thank you for reaching out!

Regarding the ExportToPng function, it is used to convert supported document formats to PNG images, one per page. We understand that the documentation may be brief, and we’d be happy to help. You can download a ZIP file with sample projects and code examples from the following page:

https://doconut.com/request-examples/

Also, if you’re currently using ExportToPng and are having trouble, please feel free to attach to this posta small example project in a ZIP file. We’d be happy to review it and help you troubleshoot any issues.