TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dip s
NA
256
81.7k
How to print RichText Box data in crystal report
Mar 23 2020 1:03 AM
Hello,
I want print rictext data (bold, italic and underline format) in asp.net mvc and angular 6.
But italic and underline is not gettting printed. It prints normal text not underline ot italic.
like my rtf input is ,
this
is
an
application
. I want to print this. But its not printting italic and underline.
My MVC code is
In datatable object dt, RTF format data is there.
da.Fill(dt);
ReportDocument cryRpt =
new
ReportDocument();
cryRpt.Load(
"C:/Report/somefile.rpt"
);
cryRpt.SetDataSource(dt);
cryRpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat,
"C:/Report/somefile.pdf"
);
var bytes = File.ReadAllBytes(
"C:/Report/somefile.pdf"
);
result1 = Convert.ToBase64String(bytes);
I am returning this
result1
to my front end
angular 6 code which is
const win = window.open(
''
,
'_blank'
);
let html =
''
;
html +=
'<html>'
;
html +=
'<body style="margin:0!important">'
;
html +=
'<embed width="100%" height="100%" src="data:application/pdf;base64,'
+ result1 +
'" type="application/pdf" />'
;
html +=
'</body>'
;
html +=
'</html>'
;
win.document.write(html);
my expected output is
this
is
an
application
please help. Thank you in advance.
Reply
Answers (
4
)
How to convert .OutputStream to byte[] array
why the PDF file not load in the PDF viewer C#?