This is a migrated thread and some comments may be shown as answers.

PDF Profiling - DrawString

1 Answer 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Love
Top achievements
Rank 1
Michael Love asked on 12 Mar 2010, 05:13 AM
Hi there.

I was just doing some profiling on how long it takes to create a PDF report I have created. The resultant PDF file is about 8 pages and has a faily simple table in a group, so the table is repeated for each group.

It took about 10 seconds to generate the report, but about 40% of the total execution time was associated with 582 calls to Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String, PdfFont, Brush, RectangleF, Boolean).

So, it appears that this method is associated with turning strings into pdf graphic elements. Are their things I can change in my report definition that limit how much this is called by eliminating fonts etc. Are certain fonts less expensive than others? Just curious why drawing characters takes 40% of the execution time.

Thoughts?

Note: I am using the Q1 2010 release.

Mike

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 15 Mar 2010, 05:53 PM
Hi Michael Love,

You cannot control the execution of this method outside of the report engine without risking to corrupt the file. If you want to make the PDF file as smaller as possible, simply exclude the fonts from being embedded like explained in the The size of the exported PDF file is big help article.

All the best,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Michael Love
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or