Web Forms :: Change Full PDF Font With ITextSharp?
Jul 5, 2012
I using iTextSharp dll. I have PDF template and I create a finished form from this template. I want to change font for all pdf, but I can't. I add "AddSubstitutionFont" in PdfStamper, but in pdf is default font. I tried with AcroFields.SetFieldProperty(....); and AcroFields.SetField(...); but labels is again with default font.
I am having an aspx page with controls as textbox ,tables ,checkbox etc .I need to convert the webpage to pdf file by a button click .I am using Itextsharp in it. when the button click event fires it shows the error as Font size too small: 0 near htmlparser.Parse(sr);
So how to rectify it .the code used for button click is :
I have a label that I am adding dynamically and I would like it to be a custom Font (I know this font works in many browswers because its the default to our companies website).I want to change the font to "Palatino Linotype" but am unsure as to how this is possible. I thought it would be as simple as: Label1.Font = "Palatino Linotype"; however, this is not the case.
I have trie:
Font Palatino_Linotype = new Font("Palatino Linotype", 12); Label24.Font = Palatino_Linotype;
I get the error before compile:
Cannont implicitly convert type 'System.Drawing.Font' to 'System.Web.UI.WebControls.FontInfo'.
That's my CSS above. Unfortunately, the Menu text still shows the hyperlink-blue color instead of White. However, if I putForeColor="White", then it works. I'd rather not do that. I'd like to be able to set it with CSS. HTML below.
I have two panels in a formview. The first panel has a dynamically set image to be used as a stationary background and it has a fixed size. Inside of this panel, I have a second panel with its Z-index set to overlay the first panel. This second "text" panel has five labels in it. These five labels contain text of varying lengths. Some much longer than others.
How can I dynamically change the font size of the labels in the second panel (or the panel as a whole) so that the text (remember it has verying lengths) is contained within the margins of the stationary panel?
I am not certain that using panels is the right way to accomplish this, but could find no other way to do the overlay concept.
I want to be able to change the font size of the span style dynamically depending on how many days in the month will be filled up. I am using a calendar object and if only 7 days are filled up so far I want to make the font larger for the user. As the month fills up more days and I want to make the font smaller, so it will all fit on the page better. Is there a way to do this?Dim linkstr as string
I want to change the font size/text size of radiobuttonlist. I used the following code:
<asp:RadioButtonList ID="rblCatName" runat="server" Font-Size="9px" AutoPostBack="true" RepeatDirection="Horizontal" onselectedindexchanged="rblCatName_SelectedIndexChanged"> but it is working. I also tried in the code behind but is not working:
what is should do to change the radiobuttonlist font size.