How to access the image file from project folder itself while writing to pdf using itext?

Ads
 

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:\\company.jpg");

it works fine But when i use this code

image = Image.getInstance("items\\company.jpg");

it doesnt work.How do i accomplish that task? It tries to search for the image in the domain folder of the glassfish location.But i want it to pick it up from the project folder itself.Because later i deploy the project in a linux server where i cannot give a path of windows.So please help me accomplish this.I am using simple java program to write the pdf.Not a servlet.Thanks

View Answers

Ads









Related Tutorials/Questions & Answers:
How to access the image file from project folder itself while writing to pdf using itext?
How to copy an jpeg image from one folder to other folder using jsp
Advertisements
How to copy an jpeg image from one folder to other folder using jsp
how to download a file from a folder??
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar
How to wrap image in the pdf file
access image from ajax store in mysql using jsp
how to retrieve the id value itself from the access database to drop down listbox in jsp
how to upload a file of apk format in a folder from servlet
How can store image in server folder when deployed with a .war file?
how to fetch image from mysql using jsp
How to insert image in PDF file in struts2
how to store image in folder and stored image path in mysql database using JSP
How to store user name,city,state,image path into database and image into folder using jsp
How to generate pdf file on click of the links using jsp..
How to generate the pdf file using jsp - JSP-Servlet
accessing data from a json file writing javascript or using jQuery
How I can filling pdf file that crated by livecycle using itext
Image name,image path into database and image into folder using jsp
display multiple image file or pdf file in multiple column of a row from server or database
how to generate PDF file using JSP with net beans
How to insert image in sql database from user using servlet
Java- Save Image into project folder in web application
How to delete the row from the Database by using while loop in servlet
How to display image in jsp from database using Servlet?
How to retrieve image from database using jsp and servlet?
How display a image on servlet from file upload - JSP-Servlet
How to download and save a file from Internet using Java?
How To Display both image and data into Swing JTable which is retrieved from ms access database
Inserting image in the pdf file

Ads