PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.net/

Long time taken to render document
http://forum.pdfsharp.net/viewtopic.php?f=2&t=3702
Page 1 of 1

Author:  njdotnetdev [ Wed Dec 06, 2017 9:03 pm ]
Post subject:  Long time taken to render document

This is how we do:
1. Create a new Document();
2. Add sections/tables/charts/paragraphs to the last section of the Document (This is all done in memory).
3. Finally, we use DocumentRenderer to save the document.

This last step takes a lot of time to save the Document.

I was wondering if there is a better way in to render and save the PDF on disk as we add last sections.

Would really appreciate an example.

Author:  TH-Soft [ Wed Dec 06, 2017 9:14 pm ]
Post subject:  Re: Long time taken to render document

Hi!

Make sure you use a current version (1.50 beta 3 or beta 4).
See this post:
viewtopic.php?p=9380#p9380

See also:
viewtopic.php?f=2&t=832


njdotnetdev wrote:
This last step takes a lot of time to save the Document.
Whatever "a lot of time" may mean here.

njdotnetdev wrote:
2. Add sections/tables/charts/paragraphs to the last section of the Document (This is all done in memory).
We don't know how many tables or how many rows there are.

If the latest version is still too slow for you needs, feel free to run it in a profiler and optimise the code further.
My changes from 2015 reduced the time by factor 10 - not bad for a start.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/