Free Support Forum - groupdocs.com

PDF Viewer latest version and MVC Razor View support


#1

Hi,


I tried many trial version with latest MVC project to implement the viewer control through Razor syntax as below
@(Html.ViewerClientCode()
.TargetElementSelector("#test2")
.Streams(Model)
.OpenThumbnails()
.ZoomToFitWidth()
.BackgroundColor("#777")
.Locale(“es-ES”)
.ShowHeader(false)
.UseHtmlBasedEngine(true)
.UseInnerThumbnails()
)

But seems this is only working with old version of PDF viewer not with the latest version. I am using Runtime version-v4.0.30319 and Version -2.7.0.0, with latest version viewer is looking document-viewer/viewdocument action. I can place in controller but dont know what will be return type and other body stuff.

Please any body can suggest what is the latest version of PDF viewer and can it can support Razor syntax and if possible provide working sample with latest MVC or atleast 4 with Razor view.

Thanks Arjun

#2

Hi Arjun,


Thanks for taking interest in GroupDocs.Viewer API.

Please note that next generation GroupDocs.Viewer for .NET 3.x series is a back end document processing API and UI has been disintegrated from it. The code piece you shared in above post is for older version (which is obsolete now) and is not compatible with the latest version of the API. Therefore, we recommend you to use latest version of the API.

I am sharing some resources with you to quickly get started with next generation GroupDocs.Viewer API.


We have also developed some sample open source document viewer applications using latest version of the API. These demo applications are helpful to understand the features and working of the API. Please download the applications from below links and give them a try.


If you get any issue or have any question, please feel free to contact us.

Warm Regards

#3

Thanks for reply, One more question, does latest version support File Stream to show the document? In application I store file as a byte data and and converting back into Stream so without creating physical file on server I want to load document.


#4

Hi Arjun,


Yes, GroupDocs.Viewer for .NET also works with file streams and you can render a document using stream in your application. You can see Working with Streams article for an example.

If you have any further questions, please feel free to ask.

Warm Regards



#5

Thank you very much!


#6

Hi Arjun,


You are always welcome.

Warm Regards