aspose file tools*
The moose likes Java in General and the fly likes Inserting Image in a PDF File generated using JAVA PdfWriter object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Inserting Image in a PDF File generated using JAVA PdfWriter object" Watch "Inserting Image in a PDF File generated using JAVA PdfWriter object" New topic
Author

Inserting Image in a PDF File generated using JAVA PdfWriter object

alpesh helwatkar
Ranch Hand

Joined: Apr 06, 2009
Posts: 30

Hi,

I have developed a web application in java.

i have some records which i display it on a dynamically created pdf using an object of pdfwriter.

i display all the records in a table.

The pdf document has a header and a footer in it

after the header the table consisting of all the data starts until all the data is finished.

now i have to insert an image on every page of the pdf at top position maybe in the header if possible!!

i've tried it but it gets inserted only in the first page and the last page that implies that the image is inserted before the table creation and after the table ends...


please guys if anyone knows the solution help me out...


the Code:---
Tekchand Prasad
Ranch Hand

Joined: Oct 20, 2005
Posts: 32


This example insert image on each page of pdf, hope it will help you.
alpesh helwatkar
Ranch Hand

Joined: Apr 06, 2009
Posts: 30

Hi Techchand,

Thanks for your prompt reply.

I tried your code.. it works but

works same as mine...

can you please tell me where to exactly merge your code in the code which i have provided.!?

i'm having serious problems with document.page() thing.

what its doing now is it is altogether creating new pages and then pasting the images without the data.

please do help..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting Image in a PDF File generated using JAVA PdfWriter object