PDF Streaming in Document Viewer

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
chintan.shah
Posts: 13
Joined: Wed Sep 13, 2023 11:56 am

PDF Streaming in Document Viewer

Post by chintan.shah »

Hello VintaSoft,
  • Can we use URL/HTTP Web URL to connect Document Viewer instead of File Path or network path?
  • Can we stream PDF in document viewer? We found that linearize pdf (Fast web view) is very quick and it loads the PDF in chunks, so if there is a large PDF file (e.g. 1 GB PDF size) then it doesn't wait to download whole 1 GB and it loads PDF metadata (file header) with few initial pages and show the initial pages and in background it loads other pages
FYI: We are talking about Document Viewer which has demo at : https://demos.vintasoft.com/AspNetCoreD ... iewerDemo/

Thank you
Chintan Shah
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: PDF Streaming in Document Viewer

Post by Alex »

Hello Chintan,

VintaSoft Web Document Viewer uses Vintasoft web services (ASP.NET Core API controllers, ASP.NET MVC5 controllers or ASP.NET HTTP handlers) to access files with images and documents.

Each Vintasoft web service uses the data storage (IDataStorage) to access stream with file data.

Current version (12.2.7.1) of VintaSoft Imaging .NET SDK provides 2 ready-to-use types of data storages:
Current version (12.2.7.1) of VintaSoft Imaging .NET SDK does not have ready-to-use functionality for solving your task but you can develop necessary functionality by yourself. For solving your task you need to do the following steps:
  • Create the StreamingStream class that derives from System.IO.Stream class and allows to read file data from URL using HTTP byte range requests.
  • Create the StreamingDataStorage class that implements Vintasoft.Data.IDataStorage interface and uses the StreamingStream class to access the file data. As example please see this article: https://www.vintasoft.com/docs/vsimagin ... abase.html
  • Create Vintasoft web services, which use instance of StreamingDataStorage class as a data storage.

Please let me know if you will have any question or problem.

Best regards, Alexander
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: PDF Streaming in Document Viewer

Post by Alex »

Hello Chintan,

VintaSoft Imaging .NET SDK 12.3 has been released today. Now WebDocumentViewerJS class can open files hosted on an HTTP server (URL) without uploading the file data onto the application's web server. You can test this functionality in VintaSoft ASP.NET Core Imaging Demo if you will click "Upload and open file from URL".

Best regards, Alexander
Post Reply