Highlights Epub open in UIWebView - ipad

Any one can help me out for highlighting on epub. I open epub on UIWebView and allow user to highlight the text which he can see in future too. I am having database to store highlights detail. I am able to highlight using javascript. But since it uses range etc it remain till page is not change or reload.
Those who donot know what is epub you can suggest me on simple html page.
Please any one can suggest me how to implement highlight just like ibook have
Any logics?
Thanks in advance

See the following for the Javascript required:
https://github.com/fedefrappi/AePubReader/blob/master/AePubReader/SearchWebView.js
Download entire project to see how it's used.

Related

iOS // show html -> rich text

What is the best way to show html -> rich text in iOS?
The problem is that some images from this text should be available offline, so I can't use a simple UIWebView.
Ideally I want to show just html with an ability to replace some special tags with other controls (UIImageView etc). I don't need to download this images from html. Both images and html will be downloaded with issues. Just need to manage the layout.
Core Text is not suitable, because to use it I'll need to parse this html manually. It should be a simpler way.
This has to be supported by iOS 6, so I can't use anything new from iOS 7.
I've seen this question. Doesn't look like this OmniGroup framework will work for me.
RTLabel doesn't support everything, what I want to have.
DTCoreText looks good, but it's not free (don't want to show their license text).
Maybe it's another cool fremework, which I didn't find yet?
Have tryed
https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.h
This will simply give string out of html. It might not be exactly what you are looking for but hope this will solve part of your problem.
But this will not solve your offline image viewing.
For image
https://github.com/rs/SDWebImage
Will do a async download and cache image.

How to fill the fillable PDF in iPhone?

PDF Expert is an iPhone application that enables user to fill the editable PDF and can save it. means It is editable form.
I used UIWebView to show the PDF, It showing exactly as it is, but the text field on it is un-editable.
I tried using the UIDocumentInteractionControllerto view the pdf, It showing well, but I can't edit on that file.
In safari browser of mac It supports only viewing the file, but Google Chrome supports editing of the file. and While opening the file using Preview application on mac, It allows edition to the user and can save it.
Please suggest me, How to edit and save the file in this..
Thank you...
I was after the same thing and found this to be a seemingly good solution: https://github.com/derekblair/ILPDFKit
Lets you fill in a form, access/set fields and then save out as a static copy.

PDF generation in XCode

I am a newbie in iPhone development. I am planning to do a PDF application for iPhone. The functionality is:
User will type their input in a text field (which is going to be the content of the PDF file).
I have to modify the PDF file through code while saving (paragraphs, tables, bullets etc).
User can save it in their own name.
User can send the PDF file as attachment of MFMailComposer.
So I have searched and got many links. However I didn't find any leading details to create and modify a PDF file in iPhone/iPad.
Can anyone please provide me a good reference to do this. Are there any alternatives to do this?
I've used this reference: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
It contains theoretical explanations and source code examples
Please use the below link to download sample apps for PDF Reader/Viewer in iOS
PDF Reader/Viewer in iOS
Also please look at detail about pdf creation, manipulation etc in below links
developer.apple: PDF Document Creation, Viewing, and Transforming
Fast-and-lean-pdf-viewer-for-iphone
If you were doing a Phonegap app I'd say got for jsPDF, which would enable you to create (basic) PDF files in Javascript. I don't do Obj-C, but a quick look on SO provides good links.

Pdf modification on iOS

I am looking to be able to open a pdf file (done) and then be able to use the touch screen to sign the pdf and then save it with the modification. From what i have read this is no easy task, and i have no idea where to begin. Any of you know any tutorials or frameworks that will help me with this ?
Also if possible being able to modify fields of a pdf file, on the desktop the pdf can have fields you can click on then type in to fill out the form, without the need to ever print. If this is possible as well that would be perfect.
Thanks.
Maybe libHaru (http://libharu.org/wiki/Main_Page) does what you want, it's worth a try.
Does your starting point have to be a PDF? steipete's suggestion of using a system to create the PDF would work if your app workflow could create the PDF (sans signature) and display it, the user "signs" it in your app, and you create the PDF again this time with the signature embedded. It depends on whether this flow is an option for your app. Often it seems easier if you treat PDF as a final document and produce the PDF in it's final form each time (final meaning that you're not going to try modifying it).

Symfony TinyMCE Widget sfWidgetFormTextareaTinyMCE will show code at the end

I'm working on my first symfony project (it's great !), i am using the sfWidgetFormTextareaTinyMCE widget for a form in the backend (to display the WYSIWYG).
It works fine, but at the frontend, instead of showing me the formated text, i have the strong,p,... tags in the text.
Same if i paste a youtube code for example.
Does someone knows how i could solve this issue ?
Thanks in advance.
Julien
so these strongs and p's... did you create them in WYSIWYG mode on the back end or did you try and paste actual code into the editor? To cut and paste code you need to be in source mode. Other wise you need to use the controls for bold on the tool bar and and line breaks for the p's.
If you used source mode, make sure strong and p are configured to be allowed by tinyMCE - i thought they were by default, but maybe not.
Thank's for your answer.
Actually i justed used the $object->getRaw()->getValue() method instead of $object->getValue() and i got the "raw" result.
In fact it was properly saved in the database, i just didn't knew how to avoid the auto escaping.

Resources