My xml file is as follows:
BBSR
The header part is the header of the document and Tests should be in table format.
Thanks
Nalini
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Marvin ReidPosted Apr 21, 2022, 1:08 PM
Garry GibsonPosted May 13, 2014, 3:30 AM
Code uses this C# Word component, I believe you will find that it's easy to use it and it has an intuitive API for creating a PDF files in C#.
Posted Dec 3, 2013, 4:55 AM
rebecca yangPosted Sep 13, 2013, 4:48 AM
C#
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Spire.Pdf;
using Spire.Pdf.Graphics;
namespace SendPdfToWebBrowser
{
public partial class WebForm_SendPdf : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
// load a pdf document ,after that ,send it to client browser as an attachment
protected void btnClientSavePdf_Click(object sender,EventArgs e)
{
// initiated an object of Spire.PdfDocument
PdfDocument doc = new PdfDocument();
// Load a pdf file
doc.LoadFromFile(this.Server.MapPath("/sample.pdf"));
// send the pdf document to client browser as an attachment
doc.SaveToHttpResponse("sample.pdf",this.Response, HttpReadType.Save);
}
// Create an pdf document ,then open it in the client browser
protected void btnClientOpenPdf_Click(object sender, EventArgs e)
{
// Initiate an object of Spire.PdfDocument
PdfDocument newDoc = new PdfDocument();
// Add a new page in this newly created pdf file
PdfPageBase page = newDoc.Pages.Add();
string message = "Hello world!" ;
PdfFont font = new PdfFont(PdfFontFamily.Helvetica,13f);
PdfBrush brush = PdfBrushes.Red;
PointF location = new PointF(20, 20);
// Draw a string with designated brush, a font, position in pdf page
page.Canvas.DrawString(message, font, brush, location);
//To open this pdf document in client browser.
newDoc.SaveToHttpResponse("sample.pdf",HttpContext.Current.Response, HttpReadType.Open);
}
}
}
Nalini MishraPosted Sep 20, 2012, 9:37 AM
I want to make one more thing clear that creating the pdf in my application is a backend process, so I dont have to display it in any UI and fetch the value from the UI.
Thank you.
Nalini MishraPosted Sep 20, 2012, 9:31 AM
I am sorry for my late reply.
What ever you did is absolutely fine and the out put should be a pdf. I do appreciate your time and help. Please help me creating the pdf.
Thanks a lot.
FroglegPosted Sep 19, 2012, 4:27 AM
I have not implemented pdf yet
Nalini MishraPosted Sep 18, 2012, 6:24 AM
I am new to this situation and appreciate your help.
FroglegPosted Sep 18, 2012, 4:50 AM
http://www.c-sharpcorner.com/UploadFile/f2e803/basic-pdf-creation-using-itextsharp-part-i/