Hi there,

A colleague of mine working with me on using FOP had this suggestion. It didn't get 
posted as he is not a member of the fop-dev mailing list. Hope you don't mind me 
forwarding this on.

Joshua

> -----Original Message-----
> From: Bird, Andrew 
> Sent: Wednesday,3 October 2001 17:17
> To: '[EMAIL PROTECTED]'
> Subject: FOP - Optimising the image caching mechanism for
> fo:external-graphic
> 
> 
> Hi,
> 
> We're using FOP version 0.20.1 here, and we were encountering 
> a wierd little problem with fo:external-graphic entities.
> 
> One of the things we're using FOP for is to create 
> pre-filled-in electronic duplicates of our paper registration 
> forms (don't ask...). These forms, like most paper forms, 
> contain lots of little check-boxes, which are either crossed 
> or left blank. As such, we have two simple images (box and 
> box-with-cross) that are referenced in heaps of 
> <fo:external-graphic> nodes throughout the FO XML.
> 
> Anyway, we found that these images were sporadically failing 
> to show up on the generated PDF files. They were sourced by 
> localhost URLs (http://localhost/etc), and on checking the 
> WWW logs I found lots and lots of GET requests for these two 
> images, some of which resulted in 403 errors thrown up by IIS 
> (again, don't ask).
> 
> I was a little puzzled, as I would have imagined that in the 
> interest of speed, FOP should surely cache images, so that if 
> the same image is referenced again, it needn't bother opening 
> and downloading the same URL twice...
> 
> Sorry - I prattle. I trolled the source, and found where and 
> why the quirk was occurring. The images ARE cached by their 
> href, but the way the code is at the moment, it's GUARANTEED 
> to attempt to open a URL connection before it even looks at 
> the image cache - this is what was causing my 403's.
> 
> I have made changes to the code to make it work (IMO) a 
> little better, and humbly submit them for your 
> approval/rejection. I apologise profusely for not going 
> though bugzilla, but this was the easiest way for me to do 
> this, as I'm unlikely to become an active member of the FOP 
> project, and in any case, I've already "solved" the bug.
> 
> Let me know if the attachment (FopImageFactory.java) stuffs 
> up, and I'll re-send it through a non-MS Outlook e-mail 
> account. (Again, profuse apologies  :)  )
> 
> Cheers,
> Anderw Bird.
> _________________________________
> Andrew Bird
> BT Funds Management
> Ph: +61 2 9259 9426
> [EMAIL PROTECTED]
> 
> 


------------------------------------------------------------------------------
This message and any attachment is confidential and may be privileged or otherwise 
protected from disclosure.  If you have received it by mistake please let us know by 
reply and then delete it from your system; you should not copy the message or disclose 
its contents to anyone.



Attachment: FopImageFactory.java
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to