i am trying to parse an xml blog found here: http://www.feed43.com/1515171705611023.xml
it has pictures within the text. I am able to parse the headers, the content and the link of the individual posts.
I, however, cannot get it to parse the paragraph spacing links within the text or images. all three of these are EXTREMELY important.
I am using this: http://github.com/mwaterfall/MWFeedParser with very few changes. most them having to do with appearances and the actual feed loaded as well as using a scroll view for the detail view instead of the table view shown.
note: it didnt load these things before I made changes either.
Can anyone help me?
What you are looking for is an html renderer, not an xml parser. On iPhone, that is WebKit, which can be used through UIWebView.
Extract the html embedded in the rss formatted xml and place it in a UIWebView using loadHTMLString. Usually, the baseURL will be the same as the rss source, without the filename.
Related
I am trying to create a program that displays pdfs in chunks. So if you have a 100 page pdf and you only want to display the first chapter you could code something for only showing pages 1 - 10. I've searched around and as it stands it seems this is the best way to display pdfs. The problem is this loads the entire pdf at once in a reader. Going through the documentation now and I can't find anyway to selectively display the pdf. is there a way to selectively display pdf text using pdfkit? or will I have to use some other library for that?
I also see there's a tabViewStyle(.page) I can use to get a paged reader view in swiftui but I'd prefer not to have to format and prettify the text if possible.
I'm not opposed to using 3rd party libraries I just don't want to have to deal with formatting text or whatever. thanks!
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
All I need to know is how to put a PDF page into a UIWebView, and then retrieve the URL value (into an NSString) of a link when clicked. Can somebody please offer their knowledge on this? Thanks in advance.
Most iPhone PDF viewers are using CGPDF to render the PDF content.
To implement features like hyperlinks (AFIK hyperlinks in PDF are done via a "link annotation" tag, but there may be some other way), the PDF viewer uses the CGPDF API to scan/parse the PDF content stream for a given page, pull out any data it is interested in, then implement support for that feature.
So for hyperlinks, a viewer may use CGPDF to render the page in a view. It would also use CGPDF to scan the page looking for link annotations, and pull out any attributes it needed (contents, destination, coordinates, etc.) It would implement a touch-handler for the view and any code to execute when a user tapped the hyperlink.
This is not possible if you render PDFs in UIWebView.
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.
I have about twenty UITextViews and corresponding .txt files. What I want is to make each UITextView take the contents of the corresponding file and display it.
Moreover, the text is formatted and it contains some formulas (copy/pasted from Grapher). I've heard about displaying formatted text in UIWebView, but I haven't found a clear explanation anywhere.
Thanks in advance!
Text files normally don't contain formatted text.
If by "formatted" you mean "html" then yes, you will want to use UIWebView. Basically you will convert the text to an HTML document, and then use the web view to display that document. There are several example projects available from Apple that show you how to use UIWebView.
Displaying formula in a UITextView will be difficult as the character rules for formula are completely different from language text. You could generate HTML to display it that but that is difficult as well.
I think your best bet would be to draw the formula to an image and then display the image. That is the traditional way to handle the display of formula.