Are they only doing a conversion to PDF or HTML respectively, but nothing related to rendering itself?
If they are doing these conversions, then does it mean that I don’t need GroupDocs.Conversion library, cause viewer library can do it all?
I’ve downloaded demos and examples, and managed to start Spring demo. However front-end source code is not available, all I can see by inspecting a page in a browser developer tools, is that it renders plain HTML, retrieved from back-end as a string.
Is some additional library needed for displaying PDF?
In case you want to display PDF document on a webpage you can use GroupDocs.Conversion or GroupDocs.Viewer. Both do the same. They take document on the input and convert it to selected output format.
Viewer is limited to produce HTML, PNG, JPEG and PDF while Conversion has much broader list of conversion pairs.
The Spring demo that you downloaded consists of the two main parts:
Angular UI - front-end application that request document pages in HTML, PNG or JPEG formats.
API - handles requests from the front-end, converts document pages to HTML, PNG or JPEG and sends the result back.
To display a file using Spring demo you have to select a file using file browser or specify filename as a query string parameter e.g. ?file=resume.docx as it show on the screenshot
I need to display PDF on a web page, not HTML (or PNG).
I did manage to run Spring demo, and to upload a file. But when displaying, it renders as a HTML:
first, API converts a file to HTML (along with other needed resources)
then it reads content from newly created HTML file and returns it as a plain string
finally, front-end renders this string as HTML
I see front-end is angular app, but minimized, and I cannot find out what components are used for this rendering; however it doesn’t matter - it is still HTML being displayed, not PDF.
P.S.
It does not seem all the formats from this link are supported - it works for .DOC, but it does not work for .DOCX
P.P.S.
Also how is it possible that GroupDocs.Viewer can convert DOC to PDF successfully, but GroupDocs.Conversion fails to do the same, with error message Font Arial was not found?
Thank you for the feedback! At the moment we can display PDF documents after they are converted to HTML, PNG or JPEG formats. We do not have a solution that can display PDF file itself.
Thank you for your answer. I really needed this confirmation.
Still, please let us know if you find out why that DOCX file cannot be converted (or if you report your internal issue, so we can track that ticket).
I have reproduced java.lang.NullPointerException when converting DOCX file with GroupDocs.Viewer for Java 24.8 but I cant reproduce the same issue with GroupDocs.Total. I was using this sample applications: