Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with IMG embedded in HTML #14

Open
GoogleCodeExporter opened this issue Jul 21, 2015 · 2 comments
Open

Problem with IMG embedded in HTML #14

GoogleCodeExporter opened this issue Jul 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Get HTML from my WYSIWYG Editor
2. HTML has an image like <img src="voasdasdnunew..."/> in base64
3. when converting to image the img is not recognized

Steps:

HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadHtml("<IMG src=\"data:image/gif;base64,iVBORw0KGgoAA...
imageGenerator.saveAsImage("C:\\tmp\\prueba.png");


What is the expected output? What do you see instead?

I want to get the image as it is displayed in Web browser

What version of the product are you using? On what operating system?

0.9.jar in W7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Mar 2013 at 9:36

@GoogleCodeExporter
Copy link
Author

Is there any way to solve this problem? I could attach any necessary file if 
required.

Original comment by [email protected] on 15 Mar 2013 at 12:21

@GoogleCodeExporter
Copy link
Author

You can create your own protocol handler for 'data:' by extending 
java.net.URLStreamHandler. You will need to register your protocol handler 
class by either including its name in the value of the 
java.protocol.handler.pkgs system property or by creating an extension of 
java.net.URLStreamHandlerFactory class and passing an instance of it to the 
java.net.URL.setURLStreamHandlerFactory method.

More information is available at:

http://stackoverflow.com/questions/9388264/jeditorpane-with-inline-image

http://www.jcgonzalez.com/java-change-url-override-protocol-ftp-apache

Original comment by [email protected] on 15 Dec 2013 at 4:05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant