c# - Create a report from word or pdf documents -
my goal create report in wpf using dev express. want add word or pdf documents report.
for word documents, opening word document richeditcontrol, saving memory stream rtf document , using xrrichtext control, adding rtf document report.
public void createreport() { richeditcontrol richedit = new richeditcontrol(); memorystream stream = new memorystream(); xrrichtext rtfdoc = new xrrichtext(); richedit.loaddocument(@"word document path", documentformat.openxml); richedit.savedocument(stream, devexpress.xtrarichedit.documentformat.rtf); rtfdoc.loadfile(stream, xrrichtextstreamtype.rtftext); rtfdoc.widthf = 550f; this.detail.controls.add(rtfdoc); this.requestparameters = false; this.createdocument(); }
is recommended way add word document rtf? , also, instead of word document, how can add pdf document report?
thank you!
check xtrarichedit - document server (available in v2011, volume 1) blog post, may helpful.
Comments
Post a Comment