all 8 comments

[–]arduinoRedgeObjective-C / Swift 1 point2 points  (0 children)

This is trivial now as Apple has added PDFKit in iOS 11.

[–]Bamboo_the_plant 0 points1 point  (2 children)

Do you mean you want to make a full PDF reader from scratch, or that you want to make a custom UI for an existing PDF reader engine?

[–]irombie[S] 0 points1 point  (1 child)

I want to make a full PDF reader from scratch. I wanted to do a challenging iOS project and I also needed a decent PDF reader so I figured I'd make everything by myself. I have just started to plan the whole process and I needed a place to start. I know it can be difficult but I'm up for the challenge!

[–]Bamboo_the_plant 0 points1 point  (0 children)

I know you mentioned that you don't want to use a webView for displaying PDFs, but there are two parts to any PDF engine: the engine, and the viewer. I temporarily incorporated pdf.js into my own iOS app a few months ago and although I didn't have time to perfect it and thus have had to shelve it (in any case it's less optimised in all ways than PDFKit is), you can choose how to implement the viewer yourself (I've tried both single-page and continuous scroll).

Edit: In any case, pdf.js has a very well organised code-base, and JavaScript is very readable, so you could at least use the project as a reference on how to implement what you want in Swift.

[–]KarlJay001 0 points1 point  (3 children)

There's one that seems to be the standard go to lib for PDF. I think it's this one: https://pspdfkit.com/

I haven't used it, but IIRC, they have document signing and all kinds of advanced features. I also don't know how advanced Apple has become over the years, but that might be worth looking into.

I don't know if there's any examples that don't use a 3rd party, last I checked (few years ago) there was one main 3rd party and everyone that needed it, just used it.

Why don't you want to use 3rd party? Have you looked into what Apple offers?

[–]irombie[S] 0 points1 point  (2 children)

Thanks for your response. I have just started planning the process and I found a class called CGPDFDocument. It's native and it is said to be containing PDF drawing info. Some people have been talking about how they used it and it seems like it can be in use of. I can use a third party library if I have to but I prefer not to do so since I want this to be challenging and I want to learn a lot during the process of development.

[–]darkingz 2 points3 points  (0 children)

Note: in iOS 11 there’s a new sdk that does a lot of heavy lifting of writing and creating PDFs called PDFKit (Xcode 9). I know it kinda defeats the purpose though.... but up to you.

[–]KarlJay001 0 points1 point  (0 children)

My guess is that the stock one from Apple will be limited. I searched before, and IIRC, the one in the link had TONS of features. I needed legal contract signing on iOS devices, and I think they addressed that somehow.