Hello Team,
I am testing Viewer with the attached 20MB pdf document, but it fails with the attached error. Can you please help?
Btw, execution is successful if I use default parameters instead of .UseHtmlBasedEngine(true, true, false, false)
.TargetElementSelector("#test
")
.Stream(ms, id.ToString(), extension, name, false, null)
.EnableRightClickMenu(false)
.ShowThumbnails(false)
.OpenThumbnails(false)
.ZoomToFitWidth(false)
.Width(1200)
.Height(900)
.DownloadPdfFileIfPossible(false)
.UseHtmlBasedEngine(true, true, false, false)
.ShowDownload(false)
.SupportTextSelection(false)
.ShowFolderBrowser(false)
.ShowHeader(false)
.ShowPaging(false)
.ShowViewerStyleControl(false)
.UseVirtualScrolling(false)
%>
Hello,
Hi Pavel,
I tried with 2.14.0.0 version of dll but with no luck.
Bellow are error details captured in log.txt:
Local time:08/25/2015 11:10:06, UTC time:08/25/2015 09:10:06 Starting saving a stream to 5bce342e-c269-413b-80c8-3e6bff5995fe
Local time:08/25/2015 11:10:07, UTC time:08/25/2015 09:10:07 Result file path: temp\S\5bce342e-c269-413b-80c8-3e6bff5995fe.pdf
Local time:08/25/2015 11:10:07, UTC time:08/25/2015 09:10:07 Stream downloaded successfully
Local time:08/25/2015 11:10:09, UTC time:08/25/2015 09:10:09 ViewDocument
Root Storage Path:D:/Temp/
Processing Folder Path:
Document Path:temp\S\5bce342e-c269-413b-80c8-3e6bff5995fe.pdf
Local time:08/25/2015 11:10:16, UTC time:08/25/2015 09:10:16 Exception
Root Storage Path:D:/Temp/
Processing Path:
Local time:08/25/2015 11:10:16, UTC time:08/25/2015 09:10:16 System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at .…ctor(Int32 , Int32 , Single , Single , PixelFormat )
at .…ctor(Int32 , Int32 , Single , Single )
at .…ctor(Int32 , Int32 )
at ..( , )
at .a.( , Dictionary2 ) <br /> at ..( ) <br /> at ..( ) <br /> at ..Convert(List
1 , , )
at ..Convert(String , , IList1 , a , ) <br /> at ..(Document , String , Stream , HtmlSaveOptions ) <br /> at Aspose.Pdf.Document.Save(String outputFileName, SaveOptions options) <br /> at ..() <br /> at ..(String path, FileType type, options) <br /> at a..(String path, FileType type, options) <br /> at ..(String filePath, Func
2 htmlWithImageCreator, String prefixForResourceUrlsInHtml, String prefixForResourceUrlsInHtmlFiles, Nullable1 firstPageParam, Nullable
1 pageCountParam, Boolean generatePagesToEndOfDocument, Boolean usePngImagesForHtmlBasedEngine, Boolean convertWordDocumentsCompletely, Boolean ignoreDocumentAbsence, Boolean saveToCustomTempStorage, Boolean supportListOfContentControls, Boolean supportListOfBookmarks, Boolean embedImagesIntoHtmlForWordFiles)
at Groupdocs.Web.UI.Handlers.BaseHandler.(IUrlsCreator urlsCreator, printableHtmlCreator, String guid, Boolean useHtmlBasedEngine, Boolean usePngImagesForHtmlBasedEngine, Nullable1 count, Nullable
1 width, Nullable1 quality, Boolean usePdf, Nullable
1 preloadPagesCount, Boolean convertWordDocumentsCompletely, String fileDisplayName, String watermarkText, Nullable1 watermarkColor, WatermarkPosition watermarkPosition, Single watermarkWidth, Boolean ignoreDocumentAbsence, Boolean supportPageRotation, Boolean supportListOfContentControls, Boolean supportListOfBookmarks, Boolean embedImagesIntoHtmlForWordFiles, String callback, String instanceId, String locale) <br /> at Groupdocs.Web.UI.Controllers.GroupdocsViewerController.ViewDocument(String guid, Boolean useHtmlBasedEngine, Boolean usePngImagesForHtmlBasedEngine, Nullable
1 count, Nullable1 width, Nullable
1 quality, Boolean usePdf, Nullable1 preloadPagesCount, Boolean convertWordDocumentsCompletely, String fileDisplayName, String watermarkText, Nullable
1 watermarkColor, WatermarkPosition watermarkPosition, Single watermarkWidth, Boolean ignoreDocumentAbsence, Boolean supportPageRotation, Boolean supportListOfContentControls, Boolean supportListOfBookmarks, Boolean embedImagesIntoHtmlForWordFiles, String callback, String instanceIdToken, String locale)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) <br /> at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
Hello Deric,
Hi Pavel,
You can access example project at https://drive.google.com/file/d/0ByZC1UqGlDWbdzF4SDVvaWs0dTQ/view?usp=sharing
Please add a valid licence file, since I removed it from project. Attached are screenshots of error. Using same code and different pdf is not resulting in error.
Without license, only first page of document is generated, as expected, so please use a valid licence in project in order to replicate the issue.
Thank you!
Hello Denic,
Thank you for the quick response, Pavel! Yes, I can see the issue is logged as WEB-1966. Looking forward to the solution/new cut.