When viewing a PDF in Reader Plus the document pages are rendered as images and then loaded in the viewer. It is possible to pre-render those images prior to viewing or as a document is loaded. Pre-rendering can improve load times as the document page images can be ready before a page has been selected for viewing.
The Reader Plus Admin Tool
The admin tool has two settings "Render Pages Ahead" and "Render Thumbnails Ahead" under the general tab. When a PDF page has been loaded in the viewer Reader Plus will pre-render page images and thumbnails according to the set value.
REST API
With Reader Plus and the P3 Rest service you can upload your files directly to the Reader Plus database without use of the user interface. Here is an example of pre-loading a PDF. In these cases you need to tell Reader Plus to pre-cache page and thumbnail. Pre-caching images and thumbnails will obey the values for "Render Pages Ahead" and "Render Thumbnails Ahead" specified in the admin tool.
Pre-cache Page Images
string strToUpload = $"http://localhost:62625/api/readerplus/GetPNG?docID={result.Details}&scale=2&isPage=true&page=1&pageRotation=0&UserPassword=";
resultString = rpclient.UploadString(strToUpload, "");
Pre-cache Page Thumbnails
strToUpload = $"http://localhost:62625/api/readerplus/GetPNG?docID={result.Details}&scale=0.3&isPage=false&page=1&pageRotation=0&UserPassword=";
resultString = rpclient.UploadString(strToUpload, "");
Comments
0 comments
Please sign in to leave a comment.