Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i hava a button and a text feild in my form design on clicking the button it should open windows explorer and let user select a pdf and the selected pdf must be displayed in the textfeild. how can i acheive this
Posted

None of the "text fields", whatever it is, can display PDF. This is just a wrong idea. You are not asking how do display, say, TIFF image in the text field, right? Then why are you asking about PDF? This is, essentially, the same thing. PDF is not text. It is not text at all. Not even close. Just forget it.

Perhaps you can get more help if you explain your ultimate goals, your scenario, something like that. Only either forget about "text fields", or forget PDF, or both. :-)

Yes, in some cases, you can convert some part of some PDF to text. But the result won't be PDF. If that could be useful for you, you can work in this direction: find one or another open-source PDF reader, and so on…

—SA
 
Share this answer
 
v2
Comments
Rahul Ramakrishnan 28-May-15 1:18am    
ohhh i'm sorry.. i was working on few assignments and i got totally confused. what i want is to display a pdf in a panel when the button is clicked. when i click the button it show open windows explorer, from there after choosing a pdf it should be displayed in the panel.
Sergey Alexandrovich Kryukov 28-May-15 1:25am    
Well, then please see Solution 2. Thank you for your clarification.
—SA
Rahul Ramakrishnan write:

ohhh i'm sorry.. i was working on few assignments and i got totally confused. what i want is to display a pdf in a panel when the button is clicked. when i click the button it show open windows explorer, from there after choosing a pdf it should be displayed in the panel.
Please see:
http://plugins.netbeans.org/plugin/52568[^],
http://stackoverflow.com/questions/14422455/how-to-display-a-pdf-file-using-pdfbox-in-jpanel[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900