 |
|
 |
Acctually i have to create a pdf for htmlpahe having the fussionchart control in it, is there any idea how i add the fussionchart to this pdf.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
i have created the pdf file but its not showing in the browser ,and kindly help me abt how to convert a matching Quition paper to pdf please send me code
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
This thing i exactly what i have been looking for, but i have noticed that it has a lot more to it than what is described in the example and i was wondering if there is any documentation on this DLL. If so how can i get my hands on it.
Thank you for creating this DLL its perfect!
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Can you convert the output of a webpage directly to a PDF document? without having to code it seperately as explained in this article?
Kind of like how in Open Office you can publish directly to PDF?
|
| Sign In·View Thread·PermaLink | 1.00/5 (3 votes) |
|
|
|
 |
|
|
 |
|
 |
Can u plz tell me how we can set height and width for the image. Also can u tell me how to fix height and width of cell.
|
| Sign In·View Thread·PermaLink | 1.33/5 (3 votes) |
|
|
|
 |
|
 |
Hi
Great dll - but how do you set the tables so that the borders do not show? I've got Border = 0, BorderWidth = 0, Padding = 0, CellPadding = 0 but still the border lines come back to haunt me!
On another point - the control "Table" causes a major conflict with WebControls.Table - perhaps giving another name like "pdfTable" might have helped?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Found a way round - but only if the background colour matches!
vTable.BorderColor = iTextSharp.text.Color.WHITE vTable.DefaultCellBorderColor = iTextSharp.text.Color.WHITE
But I'm sure there must be a better method!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
It's using response.redirect("~\1.pdf").... I want to save the pdf file on button click without directally opening into the browser. Please help me...
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
The code:
Dim doc As Document = New Document PdfWriter.GetInstance(doc, New FileStream(Request.PhysicalApplicationPath + "\1.pdf",FileMode.Create))
creates a new file at the specified location. To store the pdf-file anywhere outside the IIS-directory you could try:
PdfWriter.GetInstance(doc, New FileStream(C:\tmp\1.pdf",FileMode.Create))
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
He, is it possible to make paragraph using this library ? For example to generate a PDF text as follow / xxxxxxxxxxxxxxxx - xxxxxxxxxxxxxxxx . xxxxxxxxxxxxx . xxxxxxxxxxxxxx -
leye
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hello fstrahberger,
This article is great. Thank for your post.
I need little clarification, Is this dll and references from sourceforge.net is licensed or trail.
Whether I can use in my project, It wont show any Privacy or trail or need to buy message in future?
Can you help to clear this doubt.
It is very help full for me.
Thanks in Advance
Senthil.S A Software Engineer
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Try this:
Dim font7 As iTextSharp.text.Font = New iTextSharp.text.Font(iTextSharp.text.Font.HELVETICA, 17) table.AddCell(New Paragraph("blablabla", font7))
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
Hallo, my page is a table only and has some formviews integrated. 1. when I see the examples I think you can create new tables only and can not use a existing table. am I right or how can I solve the problem? 2. how can I say that the paperformat of the pdf is landscape?
best regards Dietrich
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
> I think you can create new tables only I don't know anything about eisting tables, I always created new documents from scratch.
>paperformat of the pdf is landscape
Dim document As Document = New Document(PageSize.LETTER.Rotate)
Regards Florian
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
Dear fstrahberger
It is really nice Article. The code is in vb.net. I have created the same one for C#.net
How can I send it(or any other samples (image)) to you.
Thank you
sheahad
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Try this conversion tool:
http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
This generated for me:
public void ShowTable() { Document doc = new Document(); PdfWriter.GetInstance(doc, new FileStream(Request.PhysicalApplicationPath + "\\2.pdf", FileMode.Create)); doc.Open(); Table table = new Table(3); table.BorderWidth = 1; table.BorderColor = new Color(0, 0, 255); table.Padding = 3; table.Spacing = 1; Cell cell = new Cell("header"); cell.Header = true; cell.Colspan = 3; table.AddCell(cell); cell = new Cell("example cell with colspan 1 and rowspan 2"); cell.Rowspan = 2; cell.BorderColor = new Color(255, 0, 0); table.AddCell(cell); table.AddCell("1.1"); table.AddCell("2.1"); table.AddCell("1.2"); table.AddCell("2.2"); table.AddCell("cell test1"); cell = new Cell("big cell"); cell.Rowspan = 2; cell.Colspan = 2; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.VerticalAlignment = Element.ALIGN_MIDDLE; cell.BackgroundColor = new Color(192, 192, 192); table.AddCell(cell); table.AddCell("cell test2"); doc.Add(table); doc.Close(); Response.Redirect("~/2.pdf"); }
|
| Sign In·View Thread·PermaLink | 2.25/5 (4 votes) |
|
|
|
 |
|
|
 |
|
 |
Hello Florian,
here's the correct way it works with C#. I put it into a Class because i will need it in different ways:
using System.IO; using System.Web; using iTextSharp.text; using iTextSharp.text.pdf;
public class PDFGenerator { private string sWorkPath;
public PDFGenerator(HttpContext context) { sWorkPath = context.Server.MapPath(""); }
public void ShowTable() { Document doc = new Document(); PdfWriter.GetInstance(doc, new FileStream(sWorkPath + "\\pdf\\2.pdf", FileMode.Create)); doc.Open(); iTextSharp.text.Table table = new Table(3); table.BorderWidth = 1; table.BorderColor = new Color(0, 0, 255); table.Padding = 3; table.Spacing = 1; Cell cell = new Cell("header"); cell.Header = true; cell.Colspan = 3; table.AddCell(cell); cell = new Cell("example cell with colspan 1 and rowspan 2"); cell.Rowspan = 2; cell.BorderColor = new Color(255, 0, 0); table.AddCell(cell); table.AddCell("1.1"); table.AddCell("2.1"); table.AddCell("1.2"); table.AddCell("2.2"); table.AddCell("cell test1"); cell = new Cell("big cell"); cell.Rowspan = 2; cell.Colspan = 2; cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.VerticalAlignment = Element.ALIGN_MIDDLE; cell.BackgroundColor = new Color(192, 192, 192); table.AddCell(cell); table.AddCell("cell test2"); doc.Add(table); doc.Close(); HttpContext.Current.Response.Redirect("~/pdf/2.pdf",false); } }
Place an asp:button to your Page
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
To your Codebehind-File add the function:
protected void Button1_Click(object sender, EventArgs e) { PDFGenerator pdfgen = new PDFGenerator(this.Context); pdfgen.ShowTable(); }
This works propper for me.
regards
Florian
Btw.: Cool and nice way to generate PDF-Files. Thank you. 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |