How to convert the text and Images insert into the rich text area into a jpeg image in gwt
since gwt rich text editor gives you the html as value you can use a server-side service to transform the html into image.
If you're using java on the server side I believe this might help a bit although I never tried it before.
Related
I have to send an image by email that may not be rendered on the receiver side. Since this image is the sole purpose of the email, the alt text should be well and richly formatted in order to translate the features the image is displaying.
As far as I know there is no way to style alt text as if it were a set of nested html tags. I saw some examples of styling, but this were not sufficient, since they were styling the whole alt text.
Any workaround for this?
Maybe a little bit of JS would solve the issue but I guess I could have a similar issues with script tags not working.
I want to display HTML design page when converting the page in PDF format.
Is this possible to do? If yes, how?
Currently my HTML page is getting distorted when converting into PDF format while using html2pdf. My header is not as per I designed it.
How to set the value of header as per css?
The script i am using is PHP.
Basically i want to know can i replace my css with the html2pdf css creation?If yes , how and what is the process/procedure?
Please Guide.
Thanks
I resolved the query on my own.
I figured it out that PDF only recognises table and not div.
So when you write an html/ design it , write in table format not div. It does not recognise float.
Hence the above question i mark as resolved.
Thanks
I would like to be able to save the contents of a decorator panel into some sort of image format. Does anyone have an ideas of how i could either take a screen shot and save it or some how export a panel to an imae format?
Try using html2canvas. GWT Panel is just a html element with some javascript to handle the layout.
You can find html2canvas here: http://html2canvas.hertzen.com/
Currently I am working on iOS client for web-chat. Thus chat messages have HTML tags (bold, italic, underlined, font color, images (smiles), etc.). For example:
<b>bold</b> <i>italic</i> <!--smile:bird--><img style="vertical-align: middle;border: none;" alt="bird" src="http://www.site.com/engine/data/emo_chat/bird.gif" /><!--/smile--> ordinaty text
For the moment I have 2 ideas how to display messages:
Add UIWebView to tables cell. But I think that it's not an option, because we will have a lot of messages and a lot of WebViews.
Add UITextView to tables cell, parse HTML tags and make necessary changes to attributed string. But UITextView doesn't support images (if I am right).
Is there any other (better) way to display such data (styled text + images)?
Using a webview per-cell is not going to work as you suspect. Webviews take a noticeable time to render which means you will likely end up with old webview content being momentarily displayed in reused cells until the new content renders. Webview is also a pretty heavy-weight UI element and you will encounter performance issues with having many of them on the screen updating at once.
You will want to parse the HTML text you are given into an attributed string using a library like DTCoreText. From here, if you can target iOS 6 or later you can set the attributedText property on a standard UILabel. If you need to target earlier iOS versions you can again use DTCoreText, specifically the DTAttributedLabel or DTAttributedTextCell components.
The parsing and NSAttributedString rendering can all be done manually using an XML parser and CoreText, but DTCoreText will make your life much easier.
Update: You mentioned in a comment that you want support for <img/>. DTCoreText does have some basic image support, but this is a really hard problem if you are rendering text with CoreText because you have to make text flow around the image correctly, and reserve some space in the core text renderer to put your image into. If there is just a single image for each cell, I would suggest you manually extract the image path/url and lay it out with a UIImageView alongside your text.
You can get idea from RTLabel stuff. It is doing same thing which you want.
You can also convert HTML to NSAttributedString with native iOS classes. Look the following post
https://stackoverflow.com/a/18886718/1760527
Is it possible to convert a PDF page in to HTML format using any objective-c library. I want to enable the text selection on PDF files.
#swiecki approach is not valid for pdfs
My suggestion is to use CoreText and add an overlay over the pdf view.
But it will be a long and tedious process as you need to parse the pdf to find coordinates of every letter.