You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Евгений Король <ff...@gmail.com> on 2019/03/20 09:50:06 UTC

Get Info about XObjects images

Hello. How to get width and height of XObject images in mm or in user space
units? I have sizes of this images only in samples. Two metods:
page.getPageImages, than images.get(0).getWidth. Its will be in samples.
And page.getResources().getXObject()..getStream().getCOSObject().toString()
i will get sizes in samples when i parse it.

AW: Re: Get Info about XObjects images

Posted by Tilman Hausherr <TH...@t-online.de>.
Either copy the code into a new project and read the usage text and pass 
the file parameter on the command line, or open the examples project in 
your IDE and run the file, but change that "args" is set with an array that 
contains your file name.

The example project contains lots of classes with main so we can't set one 
single main.

Tilman


------------------------------------------------------------------------
Gesendet mit der Telekom Mail App
<https://kommunikationsdienste.t-online.de/redirects/email_app_android_sendmail_footer>



--- Original-Nachricht ---
Von: Евгений Король
Betreff: Re: Get Info about XObjects images
Datum: 21.03.2019, 11:00 Uhr
An: users@pdfbox.apache.org





Hello. How to use PrintImageLocations.java? I tryed to create class and
call method main with args in my project. But no output. Then i tryed java
-jar pdfbox-examples-2.0.13.jar. But its write "no main manifest attribute,
in pdfbox-examples-2.0.13.jar". So I just explore the code of
PrintImageLocations.java.

ср, 20 мар. 2019 г. в 22:08, Tilman Hausherr <THausherr@t-online.de
<ma...@t-online.de> >:

> Hi, please try the PrintImageLocations.java example from the source code
> download.
>
> Tilman
>
> Am 20.03.2019 um 10:50 schrieb Евгений Король:
> > Hello. How to get width and height of XObject images in mm or in user
> space
> > units? I have sizes of this images only in samples. Two metods:
> > page.getPageImages <http://page.getPageImages> , than 
images.get(0).getWidth <http://images.get(0).getWidth> . Its will be in 
samples.
> > And
> page.getResources().getXObject()..getStream().getCOSObject().toString
<http://page.getResources().getXObject()..getStream().getCOSObject().toString> 
()
> > i will get sizes in samples when i parse it.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
<ma...@pdfbox.apache.org>
> For additional commands, e-mail: users-help@pdfbox.apache.org
<ma...@pdfbox.apache.org>
>
>

Re: Get Info about XObjects images

Posted by Евгений Король <ff...@gmail.com>.
Hello. How to use  PrintImageLocations.java? I tryed to create class and
call method main with args in my project. But no output. Then i tryed java
-jar pdfbox-examples-2.0.13.jar. But its write "no main manifest attribute,
in pdfbox-examples-2.0.13.jar". So I just explore the code of
PrintImageLocations.java.

ср, 20 мар. 2019 г. в 22:08, Tilman Hausherr <TH...@t-online.de>:

> Hi, please try the PrintImageLocations.java example from the source code
> download.
>
> Tilman
>
> Am 20.03.2019 um 10:50 schrieb Евгений Король:
> > Hello. How to get width and height of XObject images in mm or in user
> space
> > units? I have sizes of this images only in samples. Two metods:
> > page.getPageImages, than images.get(0).getWidth. Its will be in samples.
> > And
> page.getResources().getXObject()..getStream().getCOSObject().toString()
> > i will get sizes in samples when i parse it.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Get Info about XObjects images

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi, please try the PrintImageLocations.java example from the source code 
download.

Tilman

Am 20.03.2019 um 10:50 schrieb Евгений Король:
> Hello. How to get width and height of XObject images in mm or in user space
> units? I have sizes of this images only in samples. Two metods:
> page.getPageImages, than images.get(0).getWidth. Its will be in samples.
> And page.getResources().getXObject()..getStream().getCOSObject().toString()
> i will get sizes in samples when i parse it.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org