Hi!
We show a gauge control.
Phase 1 is preparation of the document (gauge running from 0% to 100%).
We use the PrepareDocumentProgress event of DocumentRenderer for this:
Code:
this.docRenderer = new DocumentRenderer(this.doc);
this.ProgressCompleted = 5; // Magic: start at 5%
this.ProgressPrepare = 95;
this.docRenderer.PrepareDocumentProgress += new DocumentRenderer.PrepareDocumentProgressEventHandler(PrepareDocumentProgressEventHandler);
this.docRenderer.PrepareDocument();
Then we create the PDF file page by page (phase 2) - also with gauge control from 0% to 100%:
Code:
int pageCount = this.docRenderer.FormattedDocument.PageCount;
[...]
for (int idx = 0; idx < pageCount; idx++)
{
DocumentObject[] docObjects = this.docRenderer.GetDocumentObjectsFromPage(idx + 1);
[...]
this.docRenderer.RenderPage(gfx, idx + 1, options);
}
Phase 1 takes more time than phase 2.