I am using MFMailComposer for mailing.I just convert the contents of URL in a string and use that string to send mail . But the problem is that HTML file contains button link image and when i mail it gives two blank icon with the HTML page.How can i remove that icons before the mail is send.
If it is not necessary to convert URL content to string. Simply pass HTML in MFMailComposer.
But even if you want to detect the TAGs in content of URL then simply parse the whole HTML of URL and check for button(input) tag. and you can check for completed button tag also. Simply ignore the statements between starting and ending point of tags and create another HTML content.
Related
I need to extract the HTML content from different pages and put them in XML file. Is there a way to get complete HTML content from child pages of a group page in Sitefinity?
Get the page nodes you need with the Sitefinity API, loop through them and do a GET request, e.g. by using WebClient() and DownloadString method.
Then do whatever you wish with the html string.
I'm triying to post HTML content to an activity with the new google + domains API with no success.
Activity activity = new Activity()
.setObject(new Activity.PlusObject().setContent("First line<br><b>second line</b>"))
.setAccess(acl);
Acording to the documentation with setConent you can specify "The HTML-formatted content, which is suitable for display." but when i try to post some html its get displayed as plain text.
I need to create an activity with some linebreaks and bold text. How can i achieve that?
Thanks in advance.
the content (HTML) field is only meant for output, you are not allowed to write in HTML. You should be writing in plain text (as you do in the browser), newlines are respected with normal line breaks (\n)
This field is useful to display formatted posts that contain links etc..
I have been working on some code that loads and saves HTML files. I have been able to create them, but after they are edited in the WebView, I need to save an HTML file from the webView back to the documents directory. I am not sure how to create the HTML file however. I would appreciate your help. I have the document file path and title.
The only way I can think of doing this is with javascript to pull out the html. For example if you have a reference to your UIWebView object called webView the following would return a string containing the inner html:
[bodyView stringByEvaluatingJavaScriptFromString:#"document.body.innerHTML"]);
You could then dress it back up to a complete html page, the javascript will only return the content within the <body> tags. Presumably within your code that loads and then edits the html page you can know, and therefore store, any specific information that occurred outside of the <body> tags such that you can restore it?
I am generating a PDF using itext 5.0.5.I am reading different mime types image,pdf,html content etc. and then reading those files from database and generating pdf.
There are two type of document user can view a individual document and a collection of documents in one single generated pdf.
I HAVE ONE PROBLEM WITH HTML content pdf header part.This html content is coming from a text area on a form,there a user will get the header information prepoulated in text area then he can type and create document.At the time of pdf generation if i am using page event to generate the header for each page for every mime type document.
For html content the header is coming two times.What i want to do is for html type document on first page header should not be generated for first page.I got the solution for pdf if i am reading the individual document but when i am reading the final pdf which is containing all documents of different mime types then it's not working.Is there any way so that i can do like header will not be generated for html type content's first page for rest of pages it will be generated using page event.
please help.
Perhaps you could use two different pageEvents when dealing with HTML. One that added headers (the current one), and one that set the page event handler to the original one.
You start off with the new one. The first page event comes along, and that new event handler changes the current page event handler. The remaining pages are stamped with headers as usual.
I can create a hyperlink to some url in an NSTextView using the "Link Panel". Or I can add a link manually using the NSLinkAttributeName attribute of NSAttributedString.
I don't want to make a hyperlink to some external url though, I want to be able to create a hyperlink to some text within the NSTextView. Do you know how in Pages you can set some text as a Bookmark, and then you can make a hyperlink to that bookmark? Any ideas or examples of how to go about that?
I haven't done this in a while so take this with a grain of salt but it goes something like:
You need to define a protocol for you app to handle URLs. It will look something like "myApplicationName://aPath"
In the apps Info.plistfile add the protocol under CFBundleURLTypes key.
Write code for the app to respond to openURL from NSWorkspace. This means the app will have to understand how to convert a URL style path to a specific location in one of its documents.
I think the best method for handling the URL path is to assign a UUID to each document and then a numeric scheme to the paragraph and sentences. The URL ends up looking like: myApplicationName://UUID/paragraphNumber/sentenceNumber/wordNumber. Alternatively you can insert hidden text to define an anchor and just search for that anchor.