Exhibitor preview

Hello,

We are a software publisher using your library for our Web application.
We are encountering a problem when previewing a PDF file that has been converted using Aspose.Cells.

Here, we can found the document Excepted.pdf (136.2 KB) and ExhibitorPreview.pdf (59.1 KB).

Here’s the code used for the preview

using GroupDocs.Viewer.Options;
using GroupDocs.Viewer.Results;
using System;
using System.IO;

namespace Web.code.Lib.GroupDocsViewer
{
    public class HtmlViewer : IDisposable
    {
        private readonly GroupDocs.Viewer.Viewer viewer;
        private readonly HtmlViewOptions htmlViewOptions;
        private readonly ViewInfoOptions viewInfoOptions;

        private Stream stream;

        public HtmlViewer(string filePath, LoadOptions loadOptions)
        {
            viewer = new GroupDocs.Viewer.Viewer(filePath, loadOptions);
            htmlViewOptions = CreateHtmlViewOptions();
            viewInfoOptions = ViewInfoOptions.FromHtmlViewOptions(htmlViewOptions);
        }

        private HtmlViewOptions CreateHtmlViewOptions()
        {
            HtmlViewOptions htmlViewOptions = HtmlViewOptions.ForEmbeddedResources(
                // The action that will be done before each page informations is read
                pageNumber =>
                {
                    Stream pageStream = new MemoryStream();
                    stream = pageStream;

                    return pageStream;
                },
                // The action to do after each page information is read.
                // Must be there otherwise the stream is disposed and we can't used it anymore
                (pageNumber, stream) =>
                {
                });

            htmlViewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();
            htmlViewOptions.SpreadsheetOptions.TextOverflowMode = TextOverflowMode.HideText;
            htmlViewOptions.SpreadsheetOptions.RenderHeadings = true;

            htmlViewOptions.ExcludeFonts = false;

            return htmlViewOptions;
        }

        public string GetPageContent(int pageNumber)
        {
            viewer.View(htmlViewOptions, pageNumber);
            stream.Position = 0;
            using (StreamReader reader = new StreamReader(stream))
            {
                string htmlContent = reader.ReadToEnd();
                stream.Dispose();
                return htmlContent;
            }
        }

        public void Dispose()
        {
            viewer.Dispose();
        }
    }
}

I have tried with the latest GroupDocs.Viewer version (24.07).
For convert to PDF, i have using Aspose.Cells latest (24.08).

Thanks by advanced.

@B.Leveille

I have found that rendered ExhibitorPreview.pdf has some visual issues, see
visual-issues.png (15.6 KB) but I don’t see any issues with Excepted.pdf. Can you please clarify if this is main issue that you’re experiencing?

Also, can you please clarify which OS and what target framework you’re using?

@vladimir.litvinchik
I’m sorry, I forgot to attach screenshots of where the problem comes from.

The first screen is what i except: image.png (11.4 KB) → obtains thanks to Excepted.pdf
The second is what i get: image.png (15.6 KB) → obtains thanks to ExhibitorPreview.pdf
We can found the mistake on red rectangle.

In the last rectangle, i can see the exponent is not correctly place.

We use a web application using .NET Framework 4.7.2 like target framework. For the OS, using IIS on Windows server.

@B.Leveille

Thank you for sharing the screenshots. We’ll take a look and update you.

@B.Leveille

We have analyzed this issue. Unfortunately, we can’t provide a workaround at the moment. This issue requires investigation. As soon as we have any new updates we’ll let you know.

@vladimir.litvinchik

Thank you for your analysis and clarifications.
Keep me updated if you have any update.

I’ll be checking back from time to time to see if there are any updates on this subject.

Thyanks by advanced.

@B.Leveille

Sure, thank you for sharing the file.

@vladimir.litvinchik
Do you have any update on this topic ?

Thanks by advanced.

@B.Leveille

Let me check the status with development team.

@B.Leveille

At the moment the issue is in Open status. As soon as the issue will be scheduled I will let you know.