Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Inserting Image in a PDF File generated using JAVA PdfWriter object

 
Ranch Hand
Posts: 30
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:---
 
Ranch Hand
Posts: 32
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This example insert image on each page of pdf, hope it will help you.
 
alpesh helwatkar
Ranch Hand
Posts: 30
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic