aspose file tools*
The moose likes JSP and the fly likes Pdf pages on jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Pdf pages on jsp" Watch "Pdf pages on jsp" New topic
Author

Pdf pages on jsp

satyaprasad veeramsetti
Greenhorn

Joined: Dec 21, 2012
Posts: 28
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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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?


Ping & DNS - updated with new look and Ping home screen widget
satyaprasad veeramsetti
Greenhorn

Joined: Dec 21, 2012
Posts: 28
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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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

Joined: Dec 21, 2012
Posts: 28
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

Joined: Jan 10, 2002
Posts: 60077
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
satyaprasad veeramsetti
Greenhorn

Joined: Dec 21, 2012
Posts: 28
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

Joined: Jan 10, 2002
Posts: 60077
    
  65

I meant iframes -- corrected.
satyaprasad veeramsetti
Greenhorn

Joined: Dec 21, 2012
Posts: 28
Please give me code to use iframes for my requirement..................
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Read NotACodeMill. "give me code" is not something appropriate to post on CodeRanch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pdf pages on jsp
 
Similar Threads
form submit
which textbook / pdf / site is good to learn servlets and jsp in detail
where to use jar files in a jsp project