Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

a5r wrote at 2013-12-04 12:06:

I like the idea of the "simple" report generation. Has anyone a sample running including text, table(s) and graph?

objo wrote at 2013-12-04 20:18:

See the WPF/ExportDemo example - it includes text, tables and graph.
The html, tex and docx outputs work as intended (I just submitted a flushing fix for html output)
Pdf output works, but is really slow (generating a few pages takes minutes, this seems to be a problem in the latest version of MigraDoc, or maybe something is not correct configured).
Xps output works - but formatting is not correct.
So... I think there is some work left to do before this is really usable...

a5r wrote at 2013-12-05 09:05:

Ok, thanks. I didn't notice that example. I'll check it out.

a5r wrote at 2013-12-05 13:01:

Apparently the slowness of rendering pdf's has to do with the migradoc implementation of drawing large tables for pdf, see On this board someone found a solution for this problem which was patched by him. However the maintainers of the project don't want to include the patch in the trunk, due to not being 100% compatible with original implementation. Patch or compiled assemblies are available on te site of the patcher, see

a5r wrote at 2013-12-05 13:37:

ok tried it with the export demo, Normal distribution example with 4004 datapoints. If you choose "Save pdf report" the Original output is finally generated after 30 seconds in my case. I replaced the pdfsharp.dll with version 1.32 and applied the patched assemblies with the WPF versions. After this replacement the pdf report was generated in less than two seconds. This example contains 78 pages of table. The rest of the report looks the same as before the replacement.

objo wrote at 2013-12-06 18:19:

Great! Do I understand correctly - you used the WPF with the patch applied, not the latest official Nuget version?

a5r wrote at 2013-12-08 15:07:

yes, I tested with the wpf versions of the migradoc dll's (not the official version but the patched version). So I did a download of pdfsharp version 1.32 and then I downloaded from all the migradoc dll's which are also version 1.32. Because I changed the original migradoc dll's i had to comment one piece of the code which was gdi+ specific. It was about retrieving the image for gdi when there is no cached image. I changed the original dll's to wpf dll's but I guess that isn't exactly necessary because there are also migradoc dll's version 1.32 which are gdi+ like the ones that oxyplot.pdf is referencing now. So maybe only upgrading pdfsharp.dll to 1.32 and applying the patched migradoc dll's will suffice.

sumsum wrote at 2014-05-12 08:33:

Can I ask where is the exact link for example of exporting to pdf containing text, table(s) and graph in Window form?


objo wrote at 2014-05-12 10:37:

There is only an example for WPF. See Source\Examples\WPF\ExportDemo