Hi,
I have implemented richtextbox editor in asp.net MVC, but actually, I need to load/open a pdf file within the richtextbox editor. so please suggest how to implement it.
Thanks and help will be appreciable.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sameer ShaikRank #1,826 · 812 reputationPosted Sep 25, 2017, 3:15 AM EDT
Mohamed AbedallahRank #2,074 · 697 reputationPosted Sep 28, 2017, 7:42 AM EDT
https://www.leadtools.com/help/leadtools/v19m/dh/pdf/pdfobject.html
The code is very simple:
/**********************************/
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Pdf;
StringBuilder sb;
sb = new StringBuilder();
PDFDocument document = new PDFDocument(@"PDFs\leadtools.pdf");
PDFParsePagesOptions options = PDFParsePagesOptions.Objects;
document.ParsePages(options, 1, -1);
foreach (PDFDocumentPage page in document.Pages)
{
Console.WriteLine("Page #" + page.PageNumber.ToString() + " Started");
foreach (PDFObject obj in page.Objects)
{
if (obj.ObjectType == PDFObjectType.Text)
{
if (obj.TextProperties.IsEndOfLine)
sb.AppendLine(obj.Code.ToString());
else
sb.Append(obj.Code);
}
}
Console.WriteLine("Page #" + page.PageNumber.ToString() + " finished");
}
this.Text = "Finished";