Welcome Guest Search | Active Topics | Sign In | Register

HTML to PDF - HTML img with src='data:image/gif;base64 Options
Michael
Posted: Saturday, May 10, 2014 11:53:55 PM
Rank: Newbie
Groups: Member

Joined: 3/25/2013
Posts: 8
When I attempt to convert a webpage that contain an img element which contains raw image data, the images do not display. This is the HTML element.

Quote:
<img id="SigImage1" src="data:image/gif;base64,R0lGODlhkAGWAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wArAAArMwArZgArmQArzAAr/wBVAABVMwBVZgBVmQBVzABV/wCAAACAMwCAZgCAmQCAzACA/wCqAACqMwCqZgCqmQCqzACq/wDVAADVMwDVZgDVmQDVzADV/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMrADMrMzMrZjMrmTMrzDMr/zNVADNVMzNVZjNVmTNVzDNV/zOAADOAMzOAZjOAmTOAzDOA/zOqADOqMzOqZjOqmTOqzDOq/zPVADPVMzPVZjPVmTPVzDPV/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YrAGYrM2YrZmYrmWYrzGYr/2ZVAGZVM2ZVZmZVmWZVzGZV/2aAAGaAM2aAZmaAmWaAzGaA/2aqAGaqM2aqZmaqmWaqzGaq/2bVAGbVM2bVZmbVmWbVzGbV/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5krAJkrM5krZpkrmZkrzJkr/5lVAJlVM5lVZplVmZlVzJlV/5mAAJmAM5mAZpmAmZmAzJmA/5mqAJmqM5mqZpmqmZmqzJmq/5nVAJnVM5nVZpnVmZnVzJnV/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wrAMwrM8wrZswrmcwrzMwr/8xVAMxVM8xVZsxVmcxVzMxV/8yAAMyAM8yAZsyAmcyAzMyA/8yqAMyqM8yqZsyqmcyqzMyq/8zVAMzVM8zVZszVmczVzMzV/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM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xyIwl6Rx2q3H0Homg0vyYMpbiRww0JGk586lyUthZaEwv7bTSUDcd9dNSMxsWlcPhbCxIWor8KtYgh70qwlvdKTTRLGUyCRqTCMrop2LHPRuTWzMFNJB1+8zRJF/K7fd150XF7mzL6o1SsrKFRp928ynueOOQMy754vQ1F0PgS8H97MKGh5Qdbpy792JxMVhtVNAGhN45SOR6/ZLDpGMeFLi3q028ukekVttZ3izBnrXpPCGe7u0lseu6TqP7J/tNZoPKO/EcjYlpUMk7CLxMcLsNvUhGu/jxbsu7NHgMz28f/W6ZBw2i9ibRK6z5JmXSCNu2C8UZcWKgnZL75sEfWPW38RNKcue/wtzPQfXLSJvKV0C8ALA27FMgthqoGMTJpnAeaV6vKMgYsNkGgxrhX+I46BhH1S4j4yMhZO5mIot8angqbAwLTygREQIggbExTJH6xMDAfeSuhzkszAxps4LyBSuImRmimxpCu/4hMYmWioHqBFIbGD7RMnDjIUI+dLQrdix3gTJIsIDoRcYELV3BimAZKaNBZQ2kTcdbo2YKxZpCdVGOSTQSqe6Ix8yQClB87CNmBjebKQrSj7cxwCHTY0MAqHGRl5mT/iCZnNxZkZKtQRMZMekYUl2Sk5kZ0yZB2cG1TQKHpEylKlfJyla68pWwjKUsZ0nLWtrylrg/zKUud8nLXvryl8AMpjCHScxiGvOYyEymMpfJzGY685nQjKY0p0nNalrzmtjMpja3yc1uevOb4AynOMf5zIAAADs=" />


When the PDF is created I get the "missing image question mark" where the image should be. Below is the code I use to convert the page:

Quote:
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertHtml("<html>" + WaiverHTML + "</html>", doc);
MemoryStream ms = new MemoryStream();
doc.Save(ms);


All of the other text renders fine in the pdf. Only the images do not show. Thanks for the help.

Michael
eo_support
Posted: Sunday, May 11, 2014 3:44:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We tested your code by call ConvertHtml("<html><body>" + imageHtml + "</body></html>") and it works fine. So there must be something else. If you can isolate the problem into a self contained test project, we will be very happy to look further.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.