pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranjit Saripalli <ranjit.saripa...@gmail.com>
Subject Re: How to identify underlying COSObject for a PDXObject or PDXObject for COSObject
Date Mon, 23 Jul 2018 17:12:46 GMT
Hi Tilman,

Thanks for you response. I can get position of the image in pdf as it is
in  printimagelocations example but I am trying to get the the location of
COSObject.

 Let me try to keep my question simple, I have a COSObject with X and Y
coordinate values  as below. How to get the actual location (lowerleftX,
lowerleftY, upperrightX, upperrightY) of this object from this X and Y
coordinates.

COSDictionary{COSName{N}:COSString{xcoordinate};COSName{V}:COSString{
0,220000000000001};}, COSDictionary{COSName{N}:COSString{ycoordinate
};COSName{V}:COSString{0,22};},


Thanks,
Ranjit

On Mon, Jul 23, 2018 at 10:06 PM, Tilman Hausherr <THausherr@t-online.de>
wrote:

> Hi, I'm not sure if this is the answer to your question (which I haven't
> really understood), but please try the PrintImageLocations.java example
> from the source code download.
>
> Image objects do not know their own location(s).
>
> Tilman
>
>
> Am 23.07.2018 um 08:50 schrieb Ranjit Saripalli:
>
>> Hi,
>>
>> I am trying to get location (Rectangle) of a COSObject but it seems only
>> xcoordinate and ycoordinate information is available for COSObject. I can
>> get the required details (location) from a PDXobject (PDXImage and
>> PDXFormObject) which is good but I am not able to find a corresponding
>> COSObject ( from PDXObject) and PDXObject has no User attribute values. I
>> need both user attribute information and location, unfortunately I cannot
>> get both from either one object (XObject or COSObject).
>>
>> I was hoping to somehow identify COSObject from a PDXObject so I can get
>> location from XObject and then attribute values from corresponding
>> COSObject.
>>
>> Could someone please share a way to identify corresponding COSObject from
>> an XObject or a way to get both user attribute values and location of an
>> element in PDF?
>>
>> Thanks in advance.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message