Bruno,
Thanks for the quick reply.
I instantiate the Image in a static block...
public static Image TINY_TREE;
static {
try {
TINY_TREE = Image.getInstance(new
URL(getSignatureImageUrl("sephora300.jpg")));
} catch (BadElementException e) {
} catch (MalformedURLException e) {
} catch (IOException e) {
}
}
In the page that generates the labels, I add the image like this:
aSlide.addCell(getTreeCell());
...
public PdfPCell getTreeCell() {
PdfPCell cell = new PdfPCell(PDFPathologyHelper.TINY_TREE);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setColspan(1);
cell.setBorderWidth(0.0f);
cell.setFixedHeight(SLIDE_FOOTER_HEIGHT);
return cell;
}
I did what you suggested (open the file in text editor), but I'm not
sure how to deduce if the document is sharing the image or using a new
one for each iteration.
Here are all the areas that reference anything about an "Image":
3 0 obj
<</Filter /DCTDecode
/Type /XObject
/Length 18680
/BitsPerComponent 8
/Height 19
/ColorSpace /DeviceGray
/Subtype /Image
/Width 35
....
<rdf:Description rdf:about='uuid:2cb0de84-6965-11d9-b85f-fe81f25ec771'
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<dc:format>image/jpeg</dc:format>
</rdf:Description>
.....
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
I'm not sure if that tell you anything. Please let me know if you
have an further advice.
Thanks,
Eric
On Mon, 17 Jan 2005 09:22:34 +0100, Bruno <[EMAIL PROTECTED]> wrote:
> Quoting Eric Schneider <[EMAIL PROTECTED]>:
>
> > I know this has been asked before, but I'm having trouble finding it
> > with the archive search.
>
> I have the same problem with GMANE, I hope it will be solved soon.
> In the maintime you can use some other list archives to search the
> list: ttp://www.lowagie.com/iText/faq.html#mailinglist
>
> > I'm using iText to print medical slide labels. Each 8 1/2 by 11 sheet
> > has 88 labels. I recently added a tiny logo to each slide label.
> > The logo looks great, but the document takes a minute a page to print.
> > It use to take seconds for the printer to finish the print job.
> >
> > Is there a more efficient way to reusing an image over and over again?
>
> How are you adding the image now?
> I think iText reuses the Image by default (normally it should
> be one object in the PDF file). If you open the PDF with a text
> editor instead of Acrobat Reader. Can you find the object(s) that
> hold the Image? How many objects are there with the same Image?
> If there is only one, you should try other printer(driver)s?
> If there are many, send a code sample to the list so we can see
> how you are adding the Image.
> br,
> Bruno
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions