You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Marcello Magaldi <ma...@gmail.com> on 2016/03/09 15:52:01 UTC
PDFPagePanel deprecated in 2.0 ?
Hi,
I cannot see PDFPagePanel class in pdfbox 2.0 , is this deprecated ? If so,
how can I show a pdf page into a jpanel or a jframe ?
I tried with 1.8.x but in my case it doesn't work so I need to use 2.0
version and downgrading, I think, is not an option.
Thanks in advance
Best Regards
Marcello Magaldi
Re: PDFPagePanel deprecated in 2.0 ?
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 10.03.2016 um 09:59 schrieb Marcello Magaldi:
> Hi Tilman,
> thank you for your response, in the meanwhile I found the BufferedImage
> solution, I wrote something like this :
>
> PDFRenderer pr;
> [....]
> BufferedImage renderImage = pr.renderImage(1);
>
> and added to a extended JPanel that draws an image in the background.
>
> I would like to know if there is another way to show the pdf page so I can
> select text and for example copy it to clipboard. I really don't know if
> it's possible but it could be useful for me.
No there isn't, i.e. there is no such code in the repository. I suspect
that several people have written such applications, but none of them has
offered it here. So you're on your own. Of course you can still do text
extraction separately with PDFTextStripper.
Tilman
>
> Best Regards
> Marcello Magaldi
>
> 2016-03-09 15:52 GMT+01:00 Marcello Magaldi <ma...@gmail.com>:
>
>> Hi,
>> I cannot see PDFPagePanel class in pdfbox 2.0 , is this deprecated ? If
>> so, how can I show a pdf page into a jpanel or a jframe ?
>>
>> I tried with 1.8.x but in my case it doesn't work so I need to use 2.0
>> version and downgrading, I think, is not an option.
>>
>> Thanks in advance
>> Best Regards
>>
>> Marcello Magaldi
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: PDFPagePanel deprecated in 2.0 ?
Posted by Marcello Magaldi <ma...@gmail.com>.
Hi Tilman,
thank you for your response, in the meanwhile I found the BufferedImage
solution, I wrote something like this :
PDFRenderer pr;
[....]
BufferedImage renderImage = pr.renderImage(1);
and added to a extended JPanel that draws an image in the background.
I would like to know if there is another way to show the pdf page so I can
select text and for example copy it to clipboard. I really don't know if
it's possible but it could be useful for me.
Best Regards
Marcello Magaldi
2016-03-09 15:52 GMT+01:00 Marcello Magaldi <ma...@gmail.com>:
> Hi,
> I cannot see PDFPagePanel class in pdfbox 2.0 , is this deprecated ? If
> so, how can I show a pdf page into a jpanel or a jframe ?
>
> I tried with 1.8.x but in my case it doesn't work so I need to use 2.0
> version and downgrading, I think, is not an option.
>
> Thanks in advance
> Best Regards
>
> Marcello Magaldi
>
Re: PDFPagePanel deprecated in 2.0 ?
Posted by Tilman Hausherr <TH...@t-online.de>.
It was deleted in 2.0 because it made too many problems. See in the
source code of the PDFDebugger subproject for inspiration. The simplest
is to create a BufferedImage and to display that one in a scroll panel,
see org.apache.pdfbox.debugger.pagepane.PagePane.
Tilman
Am 09.03.2016 um 15:52 schrieb Marcello Magaldi:
> Hi,
> I cannot see PDFPagePanel class in pdfbox 2.0 , is this deprecated ? If so,
> how can I show a pdf page into a jpanel or a jframe ?
>
> I tried with 1.8.x but in my case it doesn't work so I need to use 2.0
> version and downgrading, I think, is not an option.
>
> Thanks in advance
> Best Regards
>
> Marcello Magaldi
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org