View render errors both as pdf and as html


#1

Hi,

We have a licensed version of GroupDocs viewer and are noticing a few issues, using the files in the attached zip:

  1. Using the attached file, blank.docs, the ViewHandler.GetPdfFile call is erroring out. Seems like the pdf renderer is unable to handle certain documents that happen to have blank/empty data.

  2. Using the attached file, b21 (1).docx, the amount of time it is taking to render both as pdf and as html is an abnormally long time. Performance seems slow for certain files or certain large files. What do you see as the cause, especially for this file, and what are suggestions to improve performance?

  3. Using the attached file, IFTStmt.xlsx, both the rendering as pdf and as html are unexplainably removing some excel columns during render. Those columns become missing during render.

Thanks,
David

groupdocsErrorFiles.zip (384.8 KB)


#2

@davidtsai,

Thanks for using GroupDocs.Viewer. To investigate the issues at our end, we need to get the following details from you.

  • Platform of the API (.NET/Java)
  • Version of the API
  • Minimal code that you are using to render the documents
  • Details of the error you are getting for blank document

We look forward to hearing from you.


#3

Sure, here are the requested details:

Platform: .Net
Version: 17.7.0.0

line of code on server side where this error occurs for a blank doc, where ‘fileStream’ is pointing to the saved file in our repository:
var container = _viewerImageHandler.GetPdfFile(fileStream, new PdfFileOptions());

Details of error for the blank doc:
GroupDocs.Viewer.Exception.GroupDocsViewerException was unhandled by user code
HResult=-2146233088
Message=Unable to determine file type from a stream. Please try to specify filename with extension explicitly.
Source=GroupDocs.Viewer
StackTrace:
at . (Stream , String )
at GroupDocs.Viewer.Handler.ViewerHandler`1.GetPdfFile(Stream fileStream, PdfFileOptions pdfFileOptions)
at DocumentViewer.DocumentViewerUtils.ViewDocumentAsPdf(Stream fileStream, String documentName) in


#4

@davidtsai,

Thanks for providing the required information.

You are getting the exception because the stream object doesn’t contain any data for the blank document and the length of the stream is 0 in that case. However, the exception is not thrown when rendering document using the file name. To tackle this situation, you can use following code.

if(fileStream.Length>0)
{
   var container = _viewerImageHandler.GetPdfFile(fileStream, new PdfFileOptions());
}

We are unable to reproduce this issue at our end and the document is getting rendered within a few seconds. Would you please share with us the complete source code you are using to render the document?

We have successfully reproduced this issue at our end. The issue has been logged in our issue tracking system (with ID: VIEWERNET-1414) for further investigation. In case of any further updates, we will keep you informed.


#5

Thank you for the feedack.

Regarding the second item, b21 (1).docx, it seems not as bad on our end. Actually, files much larger than that are causing issues. I have a file that is around 5MB. although I cann’t upload it here for you to test with. For the 5MB file, there is an extremely long processing time (especially for HTML style rendering due to the number of pages and api resource calls that need to be made). How does the GroupDocs viewer handle files larger than 5MB? What would you suggest?


#6

@davidtsai,

Thanks for your response. The document rendering time depends on multiple factors such as the number of pages, document’s content which can include text, images, tables; the amount of resources that application can use; server loading and so on. However, to increase the performance and reduce the document rendering time the API provides cache feature. When GroupDocs.Viewer cache is enabled (ViewerConfig.UseCache = true), it consumes more resources and time when you render the document for the first time. When you render the same document for the second time, the API extracts data from the cache and rendering time reduces considerably. You can also check the Performance Profiles of GroupDocs.Viewer for .NET.


#7

Thanks for the suggestions. We will look into those.

There is an additional document we noticed that is having problems rendering when viewing as the html conversion. You will notice that the attached pdf has an image/data in the right side of the table in the ‘Weighted Score’ column. When this document is viewed as html through GroupDocs viewer, the resulting image is missing the content in the right-side column for ‘Weighted Score’. Are you able to replicate this same issue? When viewed as pdf using GroupDocs viewer, it is working as expected.

PDF_Document.pdf (10.3 KB)


#8

@davidtsai,

Thanks for using GroupDocs.Viewer for .NET. We have successfully reproduced your reported issue at our end. It has been logged in our issue tracking system (with ID: VIEWERNET-1420) for further investigation. In case of any updates, we’ll keep you informed.


#9

I am following up on the issue VIEWERNET-1414. Do you have some explanation as why the rendering is causing the data removal from the excel?


#10

@prasann,

I am afraid that we can not share with you the details of this behavior of the API. However, we have resolved this issue (logged as VIEWERNET-1414) and its fix will be available in the upcoming version (17.11) of GroupDocs.Viewer for .NET. Once the release is on board, we’ll notify you here. We appreciate your patience and cooperation.


#11

@davidtsai,

The issue you have found earlier (filed as VIEWERNET-1414) has been fixed in this update.


#13

@davidtsai,

We are glad to inform you that your reported issue, logged as VIEWERNET-1420, has been fixed. The fix for the issue will be the part of GroupDocs.Viewer for .NET 18.10. Once the version 18.10 is released, we’ll notify you here.


#14

@davidtsai,

The issue you have found earlier (logged as VIEWERNET-1420) has been fixed in this release.