Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
ImageContent (in emitter)
manstein
Hi all,
Im writing an emitter, and in the startImage method, want to get the size of the image .
How do i do this? the getX() etc methods are returning null.
Is there any way of getting the image dimensions in the report?
Thanks
Find more posts tagged with
Comments
zqian
If you are writing an emitter by directly implementing IContentEmitter interface, normally you should handle the layout by yourself, otherwise, you could implement another interface IAreaVisitor, which allows you access the existing layout result.
You can refer to the PDF emitter source code for details. Normally the connection between IContent and IArea looks like this:
IArea area = (IArea) content.getExtension( IContent.LAYOUT_EXTENSION );
manstein
Thanks so much, zqian .
So are the layout elements and the emitter content elements suitably 'tied' ? I mean IImageArea corresponds to the correct IImageContent, right?
zqian
Yes, basically this is true. But there's still some exceptions. In general, the IContent still describes the logical model, and the IArea describes the layout model.
manstein
The
IArea layout=(IArea) content.getExtension(content.LAYOUT_EXTENSION); call is returning null for all content types.
How do i fix this?
Do i have to invoke some layout engine first? Like for content Contentvisitor is started, so is there any layoutvisitor too?
Thanks again!