How to set iText pdf document background image

Ads
 

How to set iText pdf document background image

View Answers

September 24, 2008 at 10:24 AM

Hi friend,


Code to set background color in Pdf

import java.io.*;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;

public class PdfBgColor{
public static void main(String arg[])throws Exception
{
Rectangle pageSize = new Rectangle(400, 400);
pageSize.setBackgroundColor
(new java.awt.Color(0xDF, 0xFF, 0xDE));
Document document = new Document(pageSize);
PdfWriter.getInstance(document,
new FileOutputStream("backgroundColorPDF.pdf"));
document.open();
Paragraph para=new Paragraph("Page Size and Background color");
document.add(para);
document.add(new Paragraph("Background color--->>roseinia.net"));
document.close();
}
}

For read more information to visit....

http://www.roseindia.net/java/itext/backgroundColorPDF.shtml

Thanks

Ads









Related Tutorials/Questions & Answers:
how to set background image
how to set background image  how to set image in background in that image i want over lay text how it possible in jsp? using flash image how it is overlayed in jsp page? thanks
How to set pdf background color.
How to set pdf background color. In this example, you will see how to set back ground color of pdf in struts2.  index.jsp <html> <...)); Document document = new Document(pageSize); ServletContext
Advertisements
set background image in javafx
set background image in javafx  Hi, How to add backgroung image in javafx integrated with jswing
How to access the image file from project folder itself while writing to pdf using itext?
How to access the image file from project folder itself while writing to pdf using itext?  I am writing a pdf using itext where i add a image in the beginning of the document. When i use image = Image.getInstance("C
Adding images in itext pdf
Adding images in itext pdf  Hi, How to add image in pdf file using itext? Thanks   Hi, You can use following code... image in the pdf file. Thanks
Adding Image to Header and footer at generating Itext PDF
Adding Image to Header and footer at generating Itext PDF  i want to add Image to Header , am generating the PDF letter am able to add the text...); document.setFooter(footer); But i need to add the Image at header
how to use a image in background in your application form?
how to use a image in background in your application form?  how to use a image in background in your application form
itext pdf
itext pdf  i am generating pdf using java i want to do alignment in pdf using java but i found mostly left and right alignment in a row. i want to divide single row in 4 parts then how can i do
UIToolBar background image
UIToolBar background image  Hi, How to set background image of UIToolBar? Give me code for adding UIToolBar's background image. Thanks
How to set the Gradient Color as a background color for Java Frame?
How to set the Gradient Color as a background color for Java Frame?  How to set the Gradient Color as a background color for Java Frame
How to add image in panel as background in net beans IDE?
How to add image in panel as background in net beans IDE?  How to add image in panel as background in net beans IDE
how to create menubar and the below background color/image in java swing
how to create menubar and the below background color/image in java swing  how to create menubar and the below background color/image in java swing
UITableView Background Image
UITableView Background Image  How to set an image as a background of UITableView in iPhone SDK   I think, we can't
PDF document
PDF document  hello, How to Open a PDF document on iPhone??   You can use these There's a whole toolkit built in which lets you render PDF pages to a UIView. Check out: CGPDFDocumentCreateWithURL
How I can filling pdf file that crated by livecycle using itext
How I can filling pdf file that crated by livecycle using itext  I have pdf file that already done by livecycle.. I read it then I used the pdfstamber class to manipolute and filling file.... the result it will be a new pdf file
How to insert image in PDF file in struts2
How to insert image in PDF file in struts2 In this example, we will see how to insert image in PDF file using struts2.2.1 framework.. index.jsp <...; <body> <a href="addImage.action">Add Image in PDF
How to add background image to div using CSS?
How to add background image to div using CSS
PDF to Image
PDF to Image  Java code to convert PDF to Image
UITextField Background Image
UITextField Background Image  How can i set a background image... below.. on how to set the uitextfield leftview image.. - (void)viewDidLoad... a Background Image on UITextField - (void)viewDidLoad { [super viewDidLoad
UIButton background image
UIButton background image  Hi, How to create uibutton with background image? Thanks
How to change the dropdown values based on other dropdown in itext pdf or in any other?
How to change the dropdown values based on other dropdown in itext pdf or in any other?  How to change the drop down values based on another drop... one state that state related postal code only come in editable pdf form
Background image UIBarButtonItem
Background image UIBarButtonItem  i wanted to add a background image to my UIBarButtonItem.. that i created into .xib in my iPhone application.   Set the background image to UIBarButtonItem UIBarButtonItem *btn
UIView Background Image
UIView Background Image  HI, Please let's know how to add background image to a view? Thanks   Hi You can use the following code...:@"myimage.png"]]; Read more at UIView Image Background Tutorial page. Thanks
UITableViewCell background image
iPhone application. I have to add the background image to UITableViewCell. Please tell me how to add UITableViewCell background image. Thanks   Hi, Here is the code example of UITableViewCell background using image. UIView
filling pdf by itext
filling pdf by itext  I read the pdf that contain of text field and I want to fill this field in the same pdf file that it oppened? what the sutible... the field in PDFform.pdf ( the changing in the same file).... How I can do my
uinavigationcontroller background image
a background image to uinavigationcontroller... the Background Image to it as given below‚?¶ #import <UIKit/UIKit.h> #import <...uinavigationcontroller background image  I wants to add a background
How to set a microsoft word document PASSWORD by using Visual Basic 2008 express?
How to set a microsoft word document PASSWORD by using Visual Basic 2008 express?   How to set a microsoft word document PASSWORD by using Visual Basic 2008 express
how do i provide down a pdf document fecility on my web page using jsp and servlets?
how do i provide down a pdf document fecility on my web page using jsp and servlets?  Hai, I need a program to provide download option for pdf file on my web page,the pdf file contains retrieved data from mysql table. I need
How to change background, change background
How to change background       This example will teach you to change background of any object... a picture to change background. Selection: Make selection by the Magic wand tool
How to design a background, design a background, a background
How to design a background     ... how to design a background by this example. New File: Take a new file. Choose color: First set the foreground and background color. Clouds: Go to Filter menu
how to print pdf format
how to print pdf format  Hi every body iam doing school project iam using backend as oracle front end java .how to print student marks list... is a code that will store the database data into pdf table. We have used itext api

Ads