473,472 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to fix font-size to small error when converting an aspx page to pdf using iText?

2 New Member
I wanted to convert an aspx page contents to PDF.I am using iText in my project. While running i encountered the following problems.Can anyone help?

Expand|Select|Wrap|Line Numbers
  1. Server Error in '/' Application.
  2.  
  3. Font size too small: 0
  4.  
  5. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  6.  
  7. Exception Details: System.ArgumentException: Font size too small: 0
  8.  
  9. Source Error: 
  10.  
  11. Line 41:             HTMLWorker htmlworker = new HTMLWorker(document);
  12. Line 42:             htmlworker.Parse(str);
  13. Line 43:             document.Close();
  14. Line 44:             Response.Write(document);
  15. Line 45:             Response.End();
  16.  
  17. Source File: C:\Documents and Settings\computer\My Documents\Visual Studio 2008\Projects\projectmgmt\projectmgmt\zeroreview.aspx.cs    Line: 43 
  18.  
  19. Stack Trace: 
  20.  
  21. [ArgumentException: Font size too small: 0]
  22.    iTextSharp.text.pdf.PdfContentByte.SetFontAndSize(BaseFont bf, Single size) +155
  23.    iTextSharp.text.pdf.PdfDocument.WriteLineToContent(PdfLine line, PdfContentByte text, PdfContentByte graphics, Object[] currentValues, Single ratio) +7580
  24.    iTextSharp.text.pdf.PdfDocument.FlushLines() +844
  25.    iTextSharp.text.pdf.PdfDocument.NewPage() +243
  26.    iTextSharp.text.pdf.PdfDocument.Close() +59
  27.    iTextSharp.text.Document.Close() +130
  28.    projectmgmt.zeroreview.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\computer\My Documents\Visual Studio 2008\Projects\projectmgmt\projectmgmt\zeroreview.aspx.cs:43
  29.    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
  30.    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
  31.    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
  32.    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
  33.    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
  34.    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
  35.  
  36. Thanku...
Mar 3 '11 #1
0 1878

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Larry | last post by:
Hi I have asp.net programs. I used a very simple data transfer method by using URLs ˇ°First.aspxˇ± contents a line to send data to the ˇ°second.aspxˇ± page, for
1
by: Christopher D. Wiederspan | last post by:
I've got an ASPX page that simply builds an Xml document and does a Response.Write back to the client with that Xml, something like this: // Get the content as the Xml contained within the...
1
by: vinod_kanmantha kanmantha via .NET 247 | last post by:
(Type your message here) hi, this is vinod can any one pls tell me how we can convert aspx page into word.This aspx page consists of text boxes when we export this page to word the data in the...
1
by: asad | last post by:
hello, how ru all, I have contents(website links) file which i want to inlcude in all of my application. Contents are coming from database through an aspx page but when i'm include this file in...
5
by: Chris Ashley | last post by:
Hi there, I need to include an ASPX page within an ASP page. Is this possible? EG: making-a-claim.asp is: <!-- #include file="top.asp" -->
3
by: =?Utf-8?B?U3RlcGhhbmU=?= | last post by:
Hi, Is there a way to convert the entire output of a c# asp.net page to PDF format? I would like to send the entire web page, formatting, tables and images in pdf format by email. Actually,...
0
by: jayasabari | last post by:
Hai, I am reading the content form the msword file and displaying(writing) in aspx page(i.e., .net page). The content is displaying but some symbole is displaying My codding: ...
1
by: bhaveshkrana | last post by:
Dear Sir, It is possible to convert .aspx page into .html page at the time on page render from server to client, if yes then how describe in detail with example?
14
by: Joe | last post by:
this file is drawn in VB.NET and input output goes by XmlSerializer. Therefore, simple output file looks like: <?xml version="1.0" encoding="utf-8"?> <DrawablePicture...
0
by: ilight | last post by:
I need to convert an aspx page that contains labels, text from database, gridview and images into a PDF maintaining the same design. I tried iTextSharp & similar others but I couldnt get any of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.