473,769 Members | 8,134 Online
Bytes | Software Development & Data Engineering Community
+ 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 1960

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

Similar topics

13
1900
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
1403
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 current working model string content = someDataSet.GetXml(); // Write the response back to the user's stream this.Response.Clear(); this.Response.ContentType = "text/xml"; this.Response.Write(content);
1
3618
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 table cell is rearranged. so pls help me in sorting out this problem. -------------------------------- From: vinod_kanmantha kanmantha ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/)
1
1029
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 my web application it could not working so pls tell me how can i include this file in other aspx pages thanks.
5
8040
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
11009
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, I'd like to send something like a printscreen of the web page. Is this something possible?
0
945
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: strContents = IO.File.OpenText(path).ReadToEnd Response.Write("File Contents: " & scontents) output:
1
2797
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
1887
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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" BackColor="-1250856"> <DrawableRectangle LineWidth="2" X1="377" Y1="88" X2="323" Y2="130" ForeColor="-16777216" BackColor="-1" /> </DrawablePicture>
0
1214
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 them to work. Can someone help me with a simple working example using any open source API / some code that I can write by my own after looking at the example? and yeah, I will be using C#.NET
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.