+1 Good one. I concur. It is a good practice to define these values as
public constants in the API.

On Sat, Jan 22, 2011 at 9:31 PM, Keith O <kuuji...@hotmail.com> wrote:

>
> hi,
>
> last night i was experimenting with the HTMLWorker to parse some HTML
> generated by ASP.NET. as the book makes clear you need absolute URLs when
> dealing with images. so i implemented ImageProvider as suggested on pgs 309
> and 311. the problem was that i used a random key for the Dictionary<string,
> Object> (C# code - I read but don't don't write Java, which uses a HashMap).
> so it took a bit of time (more than i'd like to admit) for me to figure out,
> since i assumed the problem was parsing the HTML <img> URLs incorrectly.
>
> in the book on page 311 the relevant quote is "You can resolve this by
> defining an img_provider" (note no quotes around 'img_provider'). on page
> 309, in the HtmlMovies2.java code snippet, img_provider is quoted.
>
> i checked the SVN for both the .NET and Java versions, the string
> 'img_provider' is hard-coded. so even if i did remember this, a typo would
> kill the code. is there any way a constant or enum can be added for this
> value? (and for the other interfaces like FontProvider)
>
> thanks, keith
>
>
>
>
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>



-- 
Nurettin DAG
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to