You are viewing limited content. For full access, please sign in.

Question

Question

SDK: Generated PDF through SDK taking more time to load

asked on April 22, 2019

Dear All,

We successfully generated pdf files using Laserfiche SDK and was able to access these generated files in web. But loading these pdf files takes more time than expected. For a pdf generated file with 200 pages , it takes around 20 seconds to load which is still crucial. Is there any way to optimise this solution with SDK?

0 0

Replies

replied on April 23, 2019

First thing to note is that there could be a lot of reasons for the difference in load times. When you view PDF documents in the LF Web Viewer instead of the browser default, it breaks them into pages and that adds a lot of overhead.

However, compressing your PDFs can reduce the overall size dramatically depending on your source images (for example, color will get compressed a lot more than monochrome).

I'm not sure what code you are currently using, but if you check this thread I posted a sample of the code I use, which includes variable compression based on the average page size.

I've added things over time to account for watermarks and such, but I think the relevant part for you would be lines 30-75.

0 0
replied on April 24, 2019

Thank you dear Jason Smith. But using the compression feature did not help us in reducing loading time.

0 0
replied on April 23, 2019

HI Fatima, 

Do you get the long load times the second time you open up the same document? 

0 0
replied on April 24, 2019

since we are not storing the generated pdf, its the same, everytime we open that document in pdf in web browser.

0 0
replied on April 24, 2019 Show version history

Hi Famina,

I'm afraid I'm not quite following. If you generate pages, it should get stored through to the Laserfiche Server. Are you using your own external application to access the documents? 

0 0
replied on April 24, 2019

What do you mean you are not storing the generated PDF? Are you using the SDK to generate a new PDF each time the document is viewed?

If so, that is highly inefficient and will always take a noticeable amount of time.

0 0
replied on April 24, 2019

@████████: Yes we are using an external application and documents are generated each time users view it as we cannot store the generated pdfs due to some security reasons.

0 0
replied on April 25, 2019

It is important to understand that the nature of the delay is the process of rendering the PDF from TIFF images. Doing that "on demand" is never going to be fast or efficient no matter what you do.

Why don't you attach the PDF back to the LF document?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.