Add a signature image to a pdf in iOS for the iPhone/iPad in particular - iphone

With the iOS support for Quartz 2D and its support for the PDF format; should adding a signature image to a pdf be a little easier. I have looked all over and saw people are using the PDFKit, UIView or Core Graphic Library. Which is the easiest and the recommended library for the effort? Also, are there simple examples of the recommend library. When I tried to see how Quartz 2D worked, all I could find are narrative explanations about how it worked and specific method you may use but no complete examples. You know the hello world one. Anyway, I am new to iOS development but been writing code for over 20 years so I might be able to pick this OS up as well.
Can some poor soul have pity on me and please point me in the right direction?

I have done this by loading the old pdf file on view and then add signature on that view and then render the view. check the following post
Add a signature image to a pdf without showing the pdf data to user in iOS
But not able create the pdf which contain existing pdf with signature "without showing on view" .

It's too late to answer this question now. But let me just provide some pointers for people who may bump into this question in future.
This one summarizes PDF handling in iOS pretty well. Good for starters.
http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/#more-242
This one is also similar, but not very exhaustive. http://www.absoluteripple.com/1/post/2012/03/generating-pdf-in-ios.html
The above links do not talk about handling existing PDFs. I found this stackoverflow answer really useful for that.
Add pdf page to an existing pdf objective-c
Just a note, if you want manipulate existing PDFs, Quartz 2d is the way to go.
Also look at reference pages of CGPDFDocument, CGPDFPage, CGPDFContext and CGContext.

Related

Image enhancement in iphone app [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Image Processing in iPhone
In my iPhone app, I want to include image enhancement facility.
In a view, a user can see the selected image and from there, with the help of a slider they can set (brightness,contrast,hue,sharpness,saturation etc).
I don't have any idea how to do this. I have googled it but could not find any good tutorial or source code.
Please help me if somebody has any idea.
I tried to use this-But when i add the classes from folder Curve, i cannot build my project-It shows build failed without showing any issue
Have you read about CoreImage Framework?
The Core Image framework provides:
Access to built-in image processing filters
Feature detection capability
Support for automatic image enhancement
The ability to chain multiple filters together to create custom
effects
I think what you want is GLImageProcessing. It uses openGL to do the Image Processing, but it is really fast.
If you want some code with Detailed Explanation then I found one Beautiful Link for you :
It's like photoshop for the UIImage class!
You can also use CKImageAdditions.
Try this : GPUImage framework
Hope it will be helpful to you. Enjoy !!!
CoreImage Framework is a good option. Also GPUImage, which is hosted on github here: GPUImage https://github.com/BradLarson/GPUImage
It contains a huge array of filters and processors.
Use sample code from ios library reference:
http://developer.apple.com/library/ios/#samplecode/GLImageProcessing/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009053
This is better to implement inside your application.

JSON iphone help desperately needed

Hi desperate newbie in need of direction! Well I say newbie, I have almost built myself the app I set out to achieve, a tableview to display story titles from my website, that when touched using the navigation controller slides to the story/article.
Only problem is that I only have test data that is embedded into my views as an array (which is no good to me). I need this data to come from my website, www.theknowledgeoflondon.com. I want to take the title to display in the tableview and then when touch it slide to the actual article.
Been reading up and believe that JSON could be the answer or XML? I do not have a clue on this subject and if I thought learning object c and coco touch was hard this JSON OR XML thing seems to be a new world of PAIN for me!!! and there doesn’t seem to be anything by way of good tutorials out there for someone that has not a clue on the subject. My data is drawn from a simple MySql table from a php script and was hoping there is an easy way to feed this into my table view?
Would be very greatful for any information on a good way forward. Have already downloaded SBJson, but then read that JSONTouch is a good alternative to use. Or should I be using straight XML. Any help and good tutorials would be much appriciated.
Thanks you in advance.
Steve
I made an app last week that uses XML and I found it the easier way of doing what you want to do. But I found an awesome tutorial that I believe is perfect for what you are trying to do. It helps you create the web service needed and teaches you how to access the data that you wish to access.
http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app
and also check
http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
And for even more information on web related subjects also have a look at www.w3schools.com it is an amazing website dedicated to teach about web technologies such as XML and the like.
Hope it helps you as much as it has helped me.
If you have the option to choose then I will suggest to use plist format. Open a plist file with a plain text editor. You will find that that is actually a XML file. The big advantage of using plist is that you don't need another parser. You can convert a plist file directly to NSArray using arrayWithContentsOfFile or arrayWithContentsOfURL or convert them directly to NSDictionary by using similar methods. And you can create them using plist editor of Mac easily.

Highlighting Text in pdf using iphone SDK?

I had asked a question earlier How to Searching String from PDF using iphone sdk?
I got a answer but that wasn't I was looking for. I am not sure to ask something similar as new question or not.
I am using ios4.2.
I am working on a application which display PDF. I am using Quartz 2D for that. I have gone through apple documentation and googleing of around 4 days I didn't find any thing that suits to me in this case. There are lots of question related to this and almost all answers are redirecting to either
Random Ideas or
FastKit.
Random Ideas don't explain how to highlight a text within the pdf. and FastKit has implementation but no Explaination too. I don't want to use fastkit because It shows its logo. can any one please give me any link which has some libraries or apis or any thing for highlighting text in PDF while I am using Quartz 2D.
Any help will be appreciated.
Thanks In Advance.

PDF viewing/annotating library for iPhone?

I am currently working on an educational project where I would like to add some PDF reading functionality to an iPhone app. I know that it is possible to add a UIWebView and display the PDF there, however I would like to add the ability to show page number, 'next', 'previous' buttons etc. Is CGPDFDocument the direction that I should be headed or is there a better (ie more feature rich) library available? I have had a look around to try and find the capabilities of CGPDFDocument, but besides the API reference there is not much available.
Would it also be possible with this to annotate a pdf?
Thanks
JP
Here is a good (working) example of the CGPDF functions:
http://www.olivetoast.com/blog/2009/08/simple-uiscrollview-catiledlayer-pdf-example/
It uses a CATiledLayer + UIScrollView, this may not be appropriate for a reader of sorts, but it still shows you how to load and draw a PDF doc without UIWebView (which severely restricts your abilities).
Change the layer type back to a layer, add in page handling using CGPDFDocumentGetNumberOfPages and then CGPDFDocumentGetPage and you have a pretty good reader.
I don't know how to perform annotations, I suspect you would need your own data structure on top of the document.
Update: 04 Feb 2012
Check out this project, it's opensource and very well made.
I think it could be a great starting point for your PDF reader.
Project:
http://www.vfr.org/
Source:
https://github.com/vfr/Reader
There are PDF reader apps, do these not support annotations?
Another angle could be for the iPhone app to read/download pages (images) from the internet, where one could add basic annotations to that (image/layer based), these coordinates could be saved to a server. Those annotations could then be added programatically to a PDF on the server for download?

What is a good vector library for Cocoa or Cocoa-touch?

I'm looking for a good vector library for displaying animated graphics on the iPhone. Something that could possibly display SVG. Anyone have any ideas or insights?
Quartz, i.e. the vector graphics library that's already built into the phone. Depending on the requirements, you could write a parser for the parts of the SVG spec you actually plan on using. For example perhaps your application only requires the Tiny SVG spec.
Sorry that this answer doesn't point to a framework that already exists, but depending on how badly you really need it, it might make sense to roll your own or a start an open source project (especially since this is the kind of project people would probably be quite happy to contribute to).
GCDrawKit is an outstanding vector illustration framework, but it does not have native support for SVG yet and is built around AppKit, so it's not iPhone compatible. It also is not geared towards animation.
WebKit provides native support for SVG on the Mac, and even lets you manipulate the DOM to modify or save SVG, but I don't believe you're given enough access to it on the iPhone to do the same there.
Your best bet is to write a parser for SVG XML (it isn't too difficult a format), use Quartz for drawing, and back it up with Core Animation for the animated elements.
WebKit
libsvg
Cairo
github.com/SVGKit/SVGKit - almost-but-not-quite standards compliant SVG lib on iOS. (FYI i'm one of the maintainers).
UIWebView works great for SVG.
Just drop it in you app in IB, load a file into it and you are set.
You can then call JavaScript from ObjC, very useful for manipulation.
I just answered another cocoa-touch SVG question: Drawing vector graphics on iphone
but my general suggestion was to look at GitHub for answers (Objective-c & SVG Search)
https://github.com/search?type=Everything&language=objective-c&q=SVG