On-Demand PDF Rendering via Page Data Block Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for browsing PDF files in networks require downloading the entire file data, leading to time-consuming processes and poor user experience, especially for large files.
Innovation Solution
A method for on-demand loading of PDF files by determining and requesting only the necessary page data blocks, including quantity, position, and size, and rendering them block by block, with an optional caching mechanism to reduce redundant data downloads.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all data of the entire PDF file is downloaded before rendering, then complete rendering capability is achieved, but downloading time and network bandwidth consumption increase significantly
Solution Approach 1:
The patent divides the PDF file into multiple data blocks, each containing information for specific pages or rendering elements. Instead of downloading the entire file, the system downloads only the necessary data blocks for the requested pages, significantly reducing network bandwidth consumption and downloading time while maintaining complete rendering capability for the required portions.
Solution Approach 2:
The system extracts and downloads only the specific data blocks needed for rendering requested pages from the complete PDF file. By separating the necessary rendering data from the rest of the file content, the system achieves fast rendering of specific pages without requiring the entire file to be downloaded, thus resolving the contradiction between rendering completeness and downloading time.
2Adaptability or versatility
If the entire PDF file is downloaded locally, then offline access and repeated viewing are enabled, but network bandwidth is wasted for data that may not be viewed
Solution Approach 1:
The patent segments the PDF file into multiple data blocks that can be independently downloaded and cached. This allows the system to download only the specific blocks needed for requested pages rather than the entire file, reducing network bandwidth consumption while still enabling offline access to the downloaded portions. The segmented approach provides adaptability by allowing selective caching of relevant data blocks.
3Quantity of substance
If page data blocks are requested individually without caching, then memory usage is reduced, but redundant downloads increase network traffic
Solution Approach 1:
The system implements a caching mechanism that stores downloaded data blocks in memory for reuse. When a data block is downloaded for rendering a page, it is cached and can be reused for subsequent requests of the same or related pages. This preliminary caching action reduces the need for redundant network downloads, decreasing network traffic while the cached data remains in memory for quick access.
Data Source
AI summary
The present disclosure provides a method for rendering a PDF file by on-demand loading the PDF file in a network. The method comprises the following steps: acquiring basic data information of a PDF file to be rendered by a user; and according to the basic data information, determining page data block information required for rendering and displaying a corresponding page of the PDF file, wherein the page data block information comprises a quantity, a position, and a size of at least one page data block in the corresponding page; sending a request comprising the page data block information to a server, and receiving each page data block corresponding to the request; and rendering the each page data block corresponding to the request to display the corresponding page, according to the basic data information of the PDF file.
