Welcome Guest Search | Active Topics | Sign In | Register

Eo.pdf improve performance and best practices Options
rahul pulekar
Posted: Monday, December 1, 2014 5:02:28 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
HI ,

In project i am using eo.pdf to generate pdf .

Below is the analysis for the Saving multiple responses in PDF volume Testing.

Response 1st Time Download Later Download
1 ~5 - 6 seconds ~2 - 3 seconds
10 ~ 50 seconds ~33 - 38 seconds
25 ~ 104 seconds (1 min 44 seconds) ~ 99 - 101 seconds ( 1 min 39 seconds )
50 ~ 210 seconds (3 min 30 seconds) ~ 197 - 200 seconds ( 3 min 18 seconds )
100 ~ 423 - 425 (7 min 3 seconds) ~ 407 - 409 seconds ( 6 min 48 seconds )

I am using HtmlToPdf.ConvertHtml() plus PdfDocument.Merge() function to split large pdf in different smaller chuncks and using asp.net parrallel programming to generate pdf also i have added following code in class constructor to intialze engine before use

HtmlToPdf.ConvertHtml("", new PdfDocument());

but there is no increase in performance .

Can you suggest me method and best practice to improve performance ?
eo_support
Posted: Monday, December 1, 2014 4:40:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Please check whether your video card driver is a generic driver. Since the HTML to PDF converter needs to render HTML, it uses various drawing functions provided by the system. Very often this part is restricted by your video card performance, not by your CPU performance. This can become a problem on high performance server that is very strong on CPU and memory but very weak on video card since traditionally graphic rendering is not needed by a server application. In some other cases, the system actually has a good video card but did not install the proper driver for the video card, thus did not utilize the full potential of the card. In this case you can try to install the driver from the graphic card manufacturer and see if it improves performance.

We are also working on a long term solution that would make our code less dependent on graphic card but more dependent on CPU/memory. Once that part is done, the performance will be more inline with your system's CPU power.

Thanks!
rahul pulekar
Posted: Saturday, December 13, 2014 2:49:43 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Hi ,

Earlier we were using deep merge so it was taking time to merge large number of files .

Now we have used increment merge which reduced the 50 % of total time for generating 100 records

Below is the new indicators

Response 1st Time Download Later Download ( file stored on local machine)

1 ~ 3 - 4 seconds ~2 - 3 seconds
10 ~ 28 seconds ~16 - 19 seconds
25 ~ 54 seconds ~ 45 - 52 seconds
50 ~ 100-106 seconds ~ 91 - 94 seconds
100 ~ 200-197 seconds ~ 190-195 seconds

Each PDF file is size is approximate 160 KB .

Is there any other method or solution we can try to further improve performance ?






eo_support
Posted: Saturday, December 13, 2014 11:36:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You can try to set this property to false and see if it helps:

http://www.essentialobjects.com/doc/4/eo.pdf.htmltopdfoptions.retrievenodetext.aspx

Thanks!
rahul pulekar
Posted: Tuesday, December 16, 2014 1:28:03 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Hi ,

I am not using latest version of eo.pdf .

Eo.pdf version in my application : 4.0.41.2

retrivenodetext property not aavailable .

Please suggest.

eo_support
Posted: Tuesday, December 16, 2014 9:22:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

That is correct. RetrieveNodeText is added recently so it didn't exist in your version. There isn't any other options in your version that can make the conversion faster. If it is still too slow for you, you might want to consider upgrading to the current version. I do not see any order associated to your account so we are not able to give you an exact quote. If you can let us know your previous order number, then we will be able to tell you exactly how much the upgrade will cost.

Thanks!
rahul pulekar
Posted: Wednesday, December 17, 2014 6:01:43 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Hi ,

okay . First time conversion takes longer time than later conversion .

is there any thing i can do to improve performance for first conversion ?

Please suggest .
eo_support
Posted: Wednesday, December 17, 2014 9:50:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Unfortunately no. It does take a little bit longer for the first conversion.

Thanks!
rahul pulekar
Posted: Monday, December 22, 2014 7:54:56 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Hi ,

As we are not using latest version of EO.pdf , i tried by using latest Eo.pdf Nuget packages in my application
and setting RetrieveNodeText = false ,

But it actually took more time than my old code to export 100 records into PDF .

is this because i am using evaluation version dll ?
eo_support
Posted: Monday, December 22, 2014 10:28:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

No. It does not have anything to do with the trial version. The performance mainly depends on these factors:

1. The amount of time it takes to load the resource from your web server. Before each conversion, the converter has to load the HTML page and all dependency resources (CSS, JavaScript, images, etc) from your server. This part mainly depends on the speed of your server. During this phrase the CPU load is relatively low. So you can check task manager to get a basic idea of how this step takes. You can also use a traffic monitor to find out how much time this step takes;

2. Obviously the complexity of your HTML file. The bigger/more complicated your HTML file is, the longer it takes;

3. The size of your images. The bigger your image files are, the longer it takes to converter;

Hope those can give you some pointers. If none of those appears to be taking significant amount of time but the overall time is long, then you are probably reaching the limit. In that case it would not be practical to expect significant performance gains.

Thanks!
rahul pulekar
Posted: Wednesday, December 31, 2014 1:10:28 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Hi ,

we want add encryption feature .

I can see that eo.pdf gives the feature of encryption .

Following are my queries
1 . Is it possible to perform increment merge on encrypted multiple pdf files ?
2 . is there any way to perform encryption other eo.pdf in built encryption feature?

Please suggest alternative if possible .

Thanks!
rahul pulekar
Posted: Wednesday, December 31, 2014 8:28:39 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
Also in addition to encrypt file , i want it to send it to browser so user can download it after merging all files , at that time i need to decrypt it
can we achive this also ?

Please let me know
eo_support
Posted: Wednesday, December 31, 2014 9:49:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

I do not believe you can perform increment merge on encrypted files. A PDF file is encrypted with a single key (it's an automatically generated internal value), it is not possible to merge two files with two different keys into one. The only way to do is to decrypt both files first, then perform a merge. After that you can encrypt it with a new encryption key.

You can use EO.Pdf encryption feature to encrypt any PDF file as long as you have the proper password for the original PDF file.

Decrypting the file by the client browser has nothing to do with EO.Pdf. As long as the user has the correct password (if a password is required), the file can be decrypted. Or if the file is encrypted but no password is required, the user will be able to access the file without a password.

Thanks!
rahul pulekar
Posted: Wednesday, December 31, 2014 10:40:55 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
What do you mean by file is encrypted but no password required ?
Can we encrypt file without password?
My requirement is as I am storing physical PDF files and merging it into single file and then delete files after user has downloaded the final merged PDF file.
So as long as multiple PDF files remain on disk It should be encrypted and when user gets the final PDF file he should get decrypt file
Is this possible?
eo_support
Posted: Wednesday, December 31, 2014 12:46:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

A PDF file can be "encrypted" to only restrict certain permissions. For example, an author can create a PDF file that disallow user from printing the PDF file (you can do that with EO.Pdf too). In that case user can open the file without a password, but Adobe Reader will display the file as "encrypted" and would not allow user to print it.

The encryption has nothing to do with whether your file is on disk or not. For example, you can store the HTML in your database, then when user click "Download" button, you can call our HTML to PDF converter to convert it to PDF in memory, then encrypt it in memory and send the final result directly from memory to the client browser. In this case no physical PDF file has ever been created but the end user will receive an encrypted PDF file.

You can find more information on encrypting PDF file here:

http://www.essentialobjects.com/doc/4/advanced/encryption.aspx

Hope this helps. Please feel free to let us know if you have any more questions.

Thanks!
rahul pulekar
Posted: Friday, January 2, 2015 4:56:06 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
we have more than 100 of records that we need to export in to single pdf . earlier we tried with deep merge but its very slow and gives out of memory exception .
so we tried with increment merge and its very fast .

So now I am creating pdf with follwing stesps

1) convert 100 responses in pdf (1 pdf for each response) and save as physical file.
2) And merge all of them into single pdf .
3) then final merge file send it to browser and delete all temporary saved files .

but as we gaving sensitive data we need to encryt it as long as it remain on disc , so thats why we need to add encryption feature .

but increment merge is not possible with encryption.

so is there any alternative for this to use encryption and improved performance also (deep merge is very slow )?


eo_support
Posted: Friday, January 2, 2015 12:35:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

No. You will need to save the intermediate PDF file at a safe temp location. It's your server and if you have to encrypt everything on your own server it would be almost impossible to implement any effective system. For example, ASP.NET uses Web.config to store many important information such as your db connection strings, but that file is not encrypted, however the file is safe because users can not access that file directly from their browser. So your temp PDF file should employ the same strategy, it is not encrypted but user still can't access them.

Thanks!
rahul pulekar
Posted: Wednesday, January 7, 2015 4:41:30 AM
Rank: Member
Groups: Member

Joined: 12/1/2014
Posts: 13
HI ,

Regarding Enacyption feature available in EO.PDF

1 . Adding security to pdf by setting user/owner password , is it actually encryption of pdf ?
2. If yes , then which alogorithm is used for encryption ?

Thanks!
eo_support
Posted: Wednesday, January 7, 2015 7:24:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

It uses RC4 algorithm according to PDF specification 1.7 section 7.6.1.

Thanks!
retro74
Posted: Wednesday, October 28, 2015 11:51:28 AM
Rank: Newbie
Groups: Member

Joined: 9/10/2014
Posts: 1
The graphics card note above is from December-2014. Are there any updates to this graphics card issue? Any additional thought on it at this time.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.