Hi,
Can you help me to provide a sample for adding image in AFP file.
I am trying with IMImageObject
And my sample code is
IMImageObject io = new IMImageObject(imagePath);
ImageOutputControl ioc = new ImageOutputControl(0, 0);
ImageInputDescriptor iid = new ImageInputDescriptor();
ImageCellPosition icp = new ImageCellPosition(5, 5);
icp.setXFillSize(20);
icp.setYFillSize(20);
icp.setXSize(64);
icp.setYSize(8);
float shade = (float) ((5 * 0.3) + (5 * 0.59) + (5 *
0.11));
int greyscale = Math.round((shade / 255) * 16);
ImageRasterData ird = new
ImageRasterData(ImageRasterPattern
.getRasterData(greyscale));
io.setImageOutputControl(ioc);
io.setImageInputDescriptor(iid);
io.setImageCellPosition(icp);
io.setImageRasterData(ird);
page.addObject(io);
but still not able to add image.
Please provide me sample for the same.
From: Robert Meyer [mailto:[email protected]]
Sent: Tuesday, August 16, 2016 9:07 PM
To: [email protected]
Subject: RE: rendering Image file(png/bmp) on AFP file
Do you mean something like the following:
<fo:block-container absolute-position="absolute" ...>
<fo:block top="150mm" left="150mm" padding="0mm" margin="0mm">
<fo:external-graphic src="#"/>
</fo:block>
?
Best regards,
Robert
_____
From: [email protected]
To: [email protected]
Subject: rendering Image file(png/bmp) on AFP file
Date: Tue, 16 Aug 2016 20:15:25 +0530
Dear Sir,
I am developing an application using fop2.1 that create an AFP file and
write text and image at specified position in that file.
I am able to write text at specified position. But I am not getting any clue
how to do it with an image. Can you please guide for this. Thanks in
advance!
Regards
Rajkumar Singh
Disclaimer :- This e-mail and any attachment may contain confidential,
proprietary or legally privileged information. If you are not the original
intended recipient and have erroneously received this message, you are
prohibited from using, copying, altering or disclosing the content of this
message. Please delete it immediately and notify the sender. Newgen Software
Technologies Ltd (NSTL) accepts no responsibilities for loss or damage
arising from the use of the information transmitted by this email including
damages from virus and further acknowledges that no binding nature of the
message shall be implied or assumed unless the sender does so expressly with
due authority of NSTL.
Disclaimer :- This e-mail and any attachment may contain confidential,
proprietary or legally privileged information. If you are not the original
intended recipient and have erroneously received this message, you are
prohibited from using, copying, altering or disclosing the content of this
message. Please delete it immediately and notify the sender. Newgen Software
Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising
from the use of the information transmitted by this email including damages
from virus and further acknowledges that no binding nature of the message shall
be implied or assumed unless the sender does so expressly with due authority of
NSTL.