Hello everyone.
I am trying to parse some HTML into a PDF file. I installed the XMLWorkerHelper
DLL, and through extensive reading found how to use it for simple parsing using
the XMLWorkerHelper.GetInstance().ParseXHtml() method. However, I noticed that
it completely messes up on images, ignoring the size constraints specified in
the HTML code. So I was trying to find a way to override the ImageProvider. I
have the following code:
'***************************************
' Parse HTML Letter
'***************************************
objXMLParser.Parse(objFileStream)
The problem I am having is that when the Pare() line of code is executed,
everything parses except for the images. The images don't appear. I traced the
code and found that out of the four methods that the IImageProvider implements,
only the GetImageRootPath() method runs. The other methods never get called. I
am at a loss as so why the Retrieve() and Store() methods are not
called...since it's the Retrieve() method that actually creates the Image
object, and where I would need to place my code to fix the image sizes.
The samples online show the GetImageRootPath() method returning a "relative"
url, however in my case, the ASP.Net code I am writing is building the PDF on
the local server, so I am using physical path locations (ie:
C:\DirectoryName\Images\). I don't know if this is what is causing the problem,
but since I am not able to catch any errors at all, I am completely at a loss.
Please help!
-Ben
Important: This electronic mail message and any attached files contain
information intended for the exclusive use of the party or parties to whom it
is addressed and may contain information that is proprietary, privileged,
confidential and/or exempt from disclosure under applicable law. If you are
not an intended recipient, you are hereby notified that any viewing, copying,
disclosure or distribution of this information may be subject to legal
restriction or sanction. Please notify the sender, by electronic mail or
telephone, of any unintended recipients and delete the original message without
making any copies.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
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