Hi there guys,

I've been fighting with this for some time and have come to some interesting
findings.
So I am trying to render images from a url that I have loaded into a String
object.

I am using a basic code, here is a snippet...

Document do = new Document();
doc.open();
StringReader sr= new StringReader(htmlFileString);
                ArrayList <Element> htmlContentList = (ArrayList <Element>)
HTMLWorker.parseToList(sr, null);
                 
                for (int tool = 0; tool < htmlContentList.size(); tool++) {
             Element htmlDataElement = (Element) htmlContentList.get(tool);
                
             try {
                                doc.add(htmlDataElement);
                        } catch (DocumentException e) {
                                e.printStackTrace();
                        }
         }
                sr.close();
        }
doc.close();

Where the issue is quite strange. When the image is below a certain size
(~500x500) it renders fine. But when it goes beyond the borders of the
document the whole document turns blank.


Furthermore when I attempted to access an element to modify the picture size
- it seems that the   tag never passes only the surrounding  <p></p> tags
do.

Do you guys have any ideas what this may be?

Thanks for your help,

Dan

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Receive-blank-image-in-pdf-tp4327968p4327968.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
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