Free Support Forum - groupdocs.com

Error opening viewer using new comparison dll

Hi,

this morning i downloaded the new comparison dll and now get some 404 errors opening the viewer of all docs. I can’t see png images and for other documents i get a failed resource load for
document-viewer/GetResourceForHtml
In the viewer constructor i use.
.UseHtmlBasedEngine(true, false, true)
to improve to max the performances.
Please give me a fast tip or fix for this inconvenience

Thanks

Gianluca

Hello Gianluca,

We are sorry to hear that you have this issue.

It is not very clear which exact product you are using, GroupDocs.Viewer for .NET or GroupDocs.Comparison for .NET? With GroupDocs.Comparison you cannot display documents, and with GroupDocs.Viewer you cannot compare them.

GroupDocs.Comparison for .NET contains types and methods which are present in the GroupDocs.Viewer, but, independently of this, you cannot open document using the GroupDocs.Comparison for .NET. If you will try to do this, it will fail: all requests will have the HTTP 404 responses.

Thanks.

The issues you have found earlier (filed as WEB-1223;WEB-1422) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocs Notifier.

The issues you have found earlier (filed as DOCOMPARE-684;DOCOMPARE-686;DOCOMPARE-688) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocs Notifier.

The issues you have found earlier (filed as DOCOMPARE-688;DOCOMPARE-685;DOCOMPARE-686) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocsNotifier.

Hi,


in our application we need to use both Comparison and Viewer tools. If i try to include both dlls on the project there are a lot of ambiguous references between the two tools so, until the latest release of comparison, i used only this dll to run also viewer and it worked perfectly.

Is there a way to continue to use the only comparison dll? Or whats the correct way to use in the same project both comparison and viewer?

Edit: as info for response, i’m using dlls on .net mvc project

Thanks

Gianluca

Hi,

waiting for the answer of question above, trying the new comparison dll i found some issue:
  • comparing pdf documents, there is everytime the last report page but i disable it on comparison widget initialization
  • can’t debug javascript on entire application because the tool enable all js optimizations causing the minimization of them. This was a bug resolved in some release ago.
  • compare on pptx files doesn’t work
  • comparing xls files, the pictures aren’t shown
  • didn’t find a method to clean the compare result file in temp folder. In a post forum someone wrote me that this will be a feature on some future release.
For the viewer, i found that opening an empty pptx file (with no slides) it give a “file not found” error.

By the way, the above question has the maximum priority, an answer to those bugs can be given on a second moment,

Thanks

Gianluca

Hello Gianluca,

Sorry for the delay. While our developers are working on a list of reported issues, we have prepared a special project, which illustrates, how to use both GroupDocs.Viewer and GroupDocs.Comparison in a single ASP.NET WebForms project. Here it is. All necessary libraries are already included into the project, so you can unpack it, open with MS Visual Studio and run.

We will answer on all other items in this forum thread soon. Again, sorry for the delay.

Hi Denis,


thanks for the project. By a rapid look i saw that it use both 2 libraries with aliases but, anyway, i think that will be better to resolve the problem reported in the first post avoiding the use of 2 dll (that also have big dimensions) that contains so much duplicated functionalities.
This is my opinion, now i’ll try the solution, hoping that will be temporary.

Thanks

Gianluca

*** Update: i tried it and work until i tried to apply this logic to cshtml pages and razor code. Here i didn’t find a useful way to disambiguate the method
@Html.CreateViewerScriptLoadBlock
and the viewer widget creation

Hello Gianluca,

Thanks for waiting. Yes, I admit that collaborative work of both libraries in a single MVC project is not such trivial as in the WebForms. But it is possible. Here you will find an updated version of the “SeveralLibs” solution. It contains two project; with the first one (“ViewerAndComparison”) you are already familiar, but the second - “ViewerAndComparisonMVC” - contains what you need. From this project you can see how the GroupDocs.Viewer and GroupDocs.Comparison libraries can be used in a single project and work simultaneously. In short:

1. You should not use a “Viewer.InitRoutes()” and should use HTTP-handler descriptors in a web.config, like in the WebForms project.
2. You should use a “.UseHttpHandlers(true)” in the GroupDocs.VViewer widget.
3. You should exclude “document-viewer/” route from “RouteCollection”.

Of course, this should be considered as a temporary solution. Our developers are working on enabling a GroupDocs.Viewer functionality via single GroupDocs.Comparison library, but this is not trivial, because GroupDocs.Comparison library contains a modified version of GroupDocs.Viewer.


When we will have some news, we will notify you in this forum thread. And, of course, all other notified issues are under investigation.

Thanks.

Hi,

i updated the project using aliases to use both comparison and viewer tools and it works. With this post i wanna summarize all open bugs we have (both for viewer and comparison)(the referred documents can be found on this link:
  • comparing pdf documents, there is everytime the last report page but i disable it on comparison widget initialization
  • compare on pptx files doesn’t work ( i uploaded the files, named testpptx.pptx and testpptx2.pptx on drive shared folder)
  • comparing xls files, the pictures aren’t shown
  • didn’t find a method to clean the compare result file in temp folder. In a post forum someone wrote me that this will be a feature on some future release.
  • with some pdf file there are characted rendered in a bad way (look for the first page on test.pdf)
  • some eml doesn’t contain all correct datas
  • Compare doesn’t see the insertion of images
  • rendering a document with a lot of pages cause a popup in older version of internet explorer (like IE8) for javascript slow execution
  • xml can’t be viewed but setting his extension to html it render in the correct way. Can’t be done this internally by viewer?
  • using html rendered mode and also rendering in this way the tumbnails, there is a text overflow on thoses (test it with testdocx.docx)
  • ppt files render in very very slow time
This is the list of opened bugs that are opened, in some case, by some month. My chief asked me a precise date of viewer/comparison release with bugs fixes and we have a lot of problems with our customers caused by this problems.

Waiting for a response in shor time if possible
Good day

Gianluca

Hello Gianluca,

Sorry for the delay.

1. About using the GroupDocs.Viewer functionality from the GroupDocs.Comparison. As you mentioned before, yes, the previous version of GroupDocs.Comparison allowed to use GroupDocs.Viewer functionality without problems. But it was a security bug, when the user can purchase the single GroupDocs.Comparison license and use both of these products simultaneously. That’s why that “feature” was blocked in the last versions. As far as I know, you bought a GroupDocs.Total license. We have a feature request: to unblock the GroupDocs.Viewer functionality from the GroupDocs.Comparison, when a GroupDocs.Total license is applied. But now there is a period, when no one of us cannot give an estimate, when this feature will be implemented. Of course, it will be very convenient - to get rid of aliases, “using” keywords and all other stuff like that. But, unfortunately, you should wait for this for some time, if you want to use both GroupDocs.Viewer and GroupDocs.Comparison simultaneously.

2. About cleaning the compare result file in temp folder. Yes, it was me. We discussed this feature some time ago, and I need to more info for implementing it. For now, the “App_Data” folder (or any other folder, which is chosen as a root storage) stores not only the resulted files, but also the input files (“source” and “target”, in terms of GroupDocs.Comparison). And GroupDocs.Comparison needs to know, which files are input files, and which are output files, in order to delete only proper files. So, please, tell us, how you imagine this possible method, what behaviour do you expect from him, what data you want to pass through it? Maybe, something like “RemoveResult(resultFilename)”, where “resultFilename” is a filename of the file, which should be removed? Or remove all files, which match specific criteria, like defined prefix in the filename? In other words, tell us, what exactly you want to achieve, what behaviour you want to see?

3. GroupDocs.Comparison allows to compare XML files without problems. Just rename them to the “*.txt”. Here is a screenshot: http://prntscr.com/6a0oi6

4. Yes, all these bugs were reproduced and are in process. Right now I cannot give you an exact estimate, I need to contact developers and discuss every single bug. Please give us some time, we will answer in this forum thread.

Sorry for the inconvenience.

Hi Denis,


in order:
1. by now it works so we will wait for the future release of a comparison library to use only the comparison dll
2. i’m thinking about a method to delete all the files generated by comparison, for example older than a timestamp defined like for viewer. It has only to check in the root storage folder the files older than this time and delete it. Sorry if i make it so simple but i can’t see the problem in this.
3. i know that setting the extension to txt it works, but i think that if this can do internally by the library (with a low effort i think) this can avoid client code with many switch/case lines to manage this.
4. waiting for a date or release number to advice my chief and give to our customers a release date with thoses bug fixes. With other tests i saw that the pdf rotation problem with html engine set to true is still present (but not with png rendering).
5 (edit) i found that turning the project in release mode, i get the errors printed in viewer.png (attached in this post)

Thanks for the answer, waiting for some info when possible

Gianluca

Hi,

is there any news? Last post was about 20 days ago…
Gianluca

Hello Gianluca,

About the last issue you have reported: "5 (edit) i found that turning the project in release mode, i get the errors printed in viewer.png (attached in this post)"

As we understand, it occurs when using a GroupDocs.Viewer. There are several ways to solve it depends on which application pool mode you are using.
1. If you are using an integrated app pool mode, please make sure that there is a line in the “system.webServer -> handlers” in the web.config.

2. If you are using a classic app pool mode:
2.1. Make sure that there is a in the “system.web -> httpHandlers” in the web.config.
2.2. Make sure that there is a


in the “system.webServer -> handlers” in the web.config.

Thanks.

Hello Gianluca,

A list of different tickets is attached to this forum thread, you should be able to see them in the top of the thread, along with the first post, in the left side. From that list you can see that two issues are already fixed. In particular, an issue when ArgumentOutOfRangeException exception is thrown when comparing two PDF files, and ability to display a XML without renaming it to the TXT (at this moment it was done only for GroupDocs.Viewer). Other bugs and features are still in progress. Sorry for that.

Thanks.

Hi,

i resolved this last issue on my own editing the same tip you wrote, sorry for didn’t report them. The bug WEB-1539 is reported as “won’t fix”, what’s the linked signal?

My chief this morning has asked me one more time a date limit for the release of those fixes…
Thanks

Gianluca

Hello Gianluca,

Perfect, one problem less. “The bug WEB-1539 is reported as “won’t fix”, what’s the linked signal” - yes, because this “bug” is called a “Font-related HTTP-requests (WOFF and TTF) have HTTP 404 response in any cases (see details)”, and it was solved by me and by you ("…i resolved this last issue on my own editing the same tip you wrote…"). In other words, this problem is not a bug, and it is solved. That’s why - “won’t fix”.

About terms - I’ll chat with my management and will come back to you as soon as possible.

Ok, i asked you for the wont fix bug because i didn’t see the related description by this post forum!

Waiting for terms asap !
Thank you

Edit: some customers tell us that the opening of the preview (and also comparison) is very slow for file of some MB. What’s the way to obtain the maximum performances ?

Edit2: don’t know if you remember but some time ago (17/12/2014) i reported a bug where some pdf were rendered rotated of 180 degrees. With new viewer dll opening this file it gives an error, this is the viewer log:

Local time:03/20/2015 14:15:27, UTC time:03/20/2015 13:15:27 Exception
Root Storage Path:D:\Sorgenti\ViewerTemp</font>
Processing Path:
Local time:03/20/2015 14:15:27, UTC time:03/20/2015 13:15:27 System.ArgumentException: Parametro non valido.
in System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
in .“™…ctor(Int32 , Int32 , Single , Single , PixelFormat )
in .“™…ctor(Int32 , Int32 , Single , Single )
in .“™…ctor(Int32 , Int32 )
in –.—.œ(˜™ , ‹™ )
in –Ÿ.aŠ.(™ , Hashtable )
in ..‰(Œ )
in ..‰(Œ )
in .Œ.Convert(ArrayList , Œ , ‘ )
in ƒ.„.Convert(String , ‚ , IList1 , a , ˆ™ )</font></div><div><font color="#0000ff"> in š..“(Document , String , Stream , HtmlSaveOptions )</font></div><div><font color="#0000ff"> in Aspose.Pdf.Document.Save(String outputFileName, SaveOptions options)</font></div><div><font color="#0000ff"> in ..()</font></div><div><font color="#0000ff"> in ..(String path, FileType type, options)</font></div><div><font color="#0000ff"> in ..(String path, FileType type, options)</font></div><div><font color="#0000ff"> in Groupdocs.Engine.Viewing.HtmlViewingService.GenerateHtml(String filePath, Func2 htmlWithImageCreator, String prefixForResourceUrlsInHtml, String prefixForResourceUrlsInHtmlFiles, Nullable1 firstPageParam, Nullable1 pageCountParam, Boolean usePngImagesForHtmlBasedEngine, Boolean convertWordDocumentsCompletely, Boolean ignoreDocumentAbsence, Boolean saveToCustomTempStorage, Boolean supportListOfContentControls, Boolean supportListOfBookmarks, Boolean embedImagesIntoHtmlForWordFiles)
in Groupdocs.Web.UI.Handlers.BaseHandler.(IEditingService viewingService, IUrlsCreator urlsCreator, printableHtmlCreator, String guid, Boolean useHtmlBasedEngine, Boolean usePngImagesForHtmlBasedEngine, Nullable1 count, Nullable1 width, Nullable1 quality, Boolean usePdf, Nullable1 preloadPagesCount, Boolean convertWordDocumentsCompletely, String fileDisplayName, String watermarkText, Nullable`1 watermarkColor, WatermarkPosition watermarkPosition, Single watermarkFontSize, Boolean ignoreDocumentAbsence, Boolean supportPageRotation, Boolean supportListOfContentControls, Boolean supportListOfBookmarks, Boolean embedImagesIntoHtmlForWordFiles, String callback)
in Groupdocs.Web.UI.Handlers.ViewDocumentHandler.ProcessRequest(HttpContext context)

Please reproduce this, i uploaded on google drive one of thoses document. It’s very frustrating add other bugs like this 5 months after the integration on our app and 4 months i uploaded the same pdf to test for your developers

Thanks.
Gianluca

Hello Gianluca,

Sorry for the delay.

1. About the file “test222.pdf”. We checked it using the latest version 2.9.1 of the GroupDocs.Viewer for .NET - it is displayed perfectly (without exceptions and rotations) in both image-based and HTML-based rendering modes. Please check the version of the GroupDocs.Viewer, which you are using, and please give us a source code of the GroupDocs.Viewer widget. About GroupDocs.Comparison - this particular “test222.pdf” file is useless in applying it to the GroupDocs.Comparison. GroupDocs.Comparison can compare only textual content, not the image data, while the “test222.pdf” in fact contains only one image without textual content at all.

2. About bugs and improvements in the GroupDocs.Comparison for .NET and in the .GroupDocs.Viewer for .NET. On the first page of this forum thread you can see a list of attached Jira tickets. Almost all “DOCOMPARE-XXX” tickets have a “Fixed” status. The new version of the GroupDocs.Comparison for .NET, which will contain all these fixes, should be released tomorrow, on March 26. The new version 2.10 of the GroupDocs.Viewer for .NET, which also would contain fixes of the issues, which were reported by you, will be released on March 31.

3. About performance of the GroupDocs.Viewer for .NET. There are several tips how to increase performance:
3.1. First of all, try to use a pre-generated cache if possible using a “DocumentCache” class. When you opens the documents using GroupDocs.Viewer, it converts them to the HTML-compatible form (HTML code, images, CSS, JS and so on) on the fly, and this process takes time depends on the size and complexity of the document. By using the “DocumentCache” class, you can pre-generate document cache before opening an actual document in the browser; so in the moment, when the end-user will want to open the document, it will be opened almost instantly.
3.2. Try to use HTML-based rendering mode (“UseHtmlBasedEngine(true)” method) if it is suitable for you and there are no document distortions.
3.3. Use “PreloadPagesCount(1)” method. When using this method GroupDocs.Viewer will begin to load document to the client-side when first page of the document will be converted. When this method is not used, GroupDocs.Viewer converts all pages of a document and only then sends it to the client-side.
3.4. Use “MinimumImageWidth(value)” method. MinimumImageWidth: if set, the Viewer will load page images with the specified width from the server when starting. It will not load page images from the server again after zooming if the current page image size is smaller than the value specified and if the original (not scaled) page image size is smaller than the value specified. It means that in most cases the GroupDocs.Viewer will load page images only once and will not reload them after zooming in/out.
3.5. If this is possible for your business-logic, disable thumbnails (“ShowThumbnails(false)”).
3.6. If this is possible for your business-logic, disable ability to select text by using “SupportTextSelection(false)” method.
3.7. Use “ShowViewerStyleControl(false)” method - it will disable “double page flip” option and will increase performance.

Thanks. If you will have more questions please feel free to contact us.