• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pdf pages on jsp

 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I am facing a problem, i.e. i have one pdf file which has two pages. I want to display first page on jsp as output with same size, color, format,

Please send me the code.

Thanks in advance.

-Satyaprasad
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refrain from using colors and large font sizes for entire posts.

Also, we don't just hand out code: https://www.coderanch.com/how-to/java/NotACodeMill

It sounds like you're asking for a PDF-to-HTML translator. That's going to be tough - PDF is not really meant for extracting layout information after it's been generated. What is the advantage of displaying an HTML page containing the same information you already have in the PDF? Why not just link to the PDF instead?
 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I have a pdf file which is located in my project context in tomcat server/webapps folder. Now i want to display 5th page of pdf file as output using jsp. Please tell me solution


-Thanks
Satyaprasad
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once again, please refrain from using font size tags for entire posts.#

There's no difficulty in extracting any particular page from a PDF (using a library like PDFBox), so you could link to that, but duplicating the layout of a PDF page in HTML is going to be very hard. So - what are the answers to the question I asked in my previous post?
 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,
Actually my requirement is, i have one jsp which is used to display pdf pages. For this i have created that jsp that contains 2 divs. In those two divs, i want to display pdf pages like 1 & 2 ------ 3 & 4 like alternative process.
Now i dont require about font color & size. i need to display all pdf pages in those divs in jsp page.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to display the actual PDF(s), you will not be able to do that in a div element; you could consider iframes, perhaps.

 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,
But if we use frames, that frame should contain one toolbar which has zoom option, page numbers, find and etc.

I want to display only pdf page which contains only actual data. Is it possible using frame?

Please send me that sample code.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant iframes -- corrected.
 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give me code to use iframes for my requirement..................
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read NotACodeMill. "give me code" is not something appropriate to post on CodeRanch.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic