{"id":1544,"url":"https://github.com/vfr/Reader","last_synced_at":"2025-08-02T04:31:42.045Z","repository":{"id":1063949,"uuid":"900234","full_name":"vfr/Reader","owner":"vfr","description":"PDF Reader Core for iOS","archived":false,"fork":false,"pushed_at":"2019-12-30T22:34:28.000Z","size":1846,"stargazers_count":4261,"open_issues_count":1,"forks_count":1145,"subscribers_count":263,"default_branch":"master","last_synced_at":"2024-04-24T19:02:10.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.vfr.org/","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vfr.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-10T00:51:55.000Z","updated_at":"2024-04-16T19:06:18.000Z","dependencies_parsed_at":"2022-08-05T13:32:10.665Z","dependency_job_id":null,"html_url":"https://github.com/vfr/Reader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfr%2FReader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfr%2FReader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfr%2FReader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfr%2FReader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vfr","download_url":"https://codeload.github.com/vfr/Reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228438962,"owners_count":17920017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:49.447Z","updated_at":"2024-12-06T08:31:12.110Z","avatar_url":"https://github.com/vfr.png","language":"Objective-C","readme":"\n### PDF Reader Core for iOS\n---\n\n*This project is no longer supported or maintained. It is only here for historical reasons.\nPlease see the [UXReader PDF Framework for iOS](https://github.com/vfr/UXReader-iOS) project for a possible replacement.*\n\n---\n\n### Introduction\n\nI've crafted this open source PDF reader code for fellow iOS\ndevelopers struggling with wrangling PDF files onto iOS device\nscreens.\n\nThe code is universal and does not require any XIBs (as all UI\nelements are code generated, allowing for greatest flexibility).\nIt runs on iPad, iPhone and iPod touch with iOS 6.0 and up. Also\nsupported are the Retina displays in all new devices and is ready\nto be fully internationalized. The idea was to provide a complete\nproject template that you could start building from, or, just pull\nthe required files into an existing project to enable PDF\nreading/viewing in your app(s).\n\n![iPad Page](http://i.imgur.com/jaeCPz1.png)\u003cp\u003e\u003c/p\u003e\n![iPad Thumbs](http://i.imgur.com/1b4kY9s.png)\u003cp\u003e\u003c/p\u003e\n![iPod Page](http://i.imgur.com/y8wWRDN.png)\u003cp\u003e\u003c/p\u003e\n![iPod Thumbs](http://i.imgur.com/nddT2RP.png)\u003cp\u003e\u003c/p\u003e\n\nAfter launching the sample app, tap on the left hand side of the\nscreen to go back a page. Tap on the right hand side to go to the\nnext page. You can also swipe left and right to change pages. Tap\non the screen to fade in the toolbar and page slider. Double-tap\nwith one finger (or pinch out) to zoom in. Double tap with two\nfingers (or pinch in) to zoom out.\n\nThis implementation has been tested with large PDF files (over\n250MB in size and over 2800 pages in length) and with PDF files of\nall flavors (from text only documents to graphics heavy magazines).\nIt also works rather well on older devices (such as the iPod touch\n4th generation and iPhone 3GS) and takes advantage of the dual-core\nprocessor (via CATiledLayer and multi-threading) in new devices.\n\nTo see an example open source PDF Viewer App that uses this code\nas its base, have a look at this project repository on GitHub:\nhttps://github.com/vfr/Viewer\n\n### Features\n\nMultithreaded: The UI is always quite smooth and responsive.\n\nSupports:\n\n - iBooks-like document navigation.\n - Device rotation and all orientations.\n - Encrypted (password protected) PDFs.\n - PDF links (URI and go to page).\n - PDFs with rotated pages.\n\n### Notes\n\nVersion 2.x of the PDF reader code was originally developed\nand tested under Xcode 3.2.6, LLVM 1.7 and iOS 4 with current\ndevelopment and testing under Xcode 7.2, LLVM 7.0 and iOS 9.2.\nPlease note that as of v2.6, the code was refactored to use ARC.\n\nThe overall PDF reader functionality is encapsulated in the\nReaderViewController class. To present a document with this class,\nyou first need to create a ReaderDocument object with the file path\nto the PDF document and then initialize a new ReaderViewController\nwith this ReaderDocument object. The ReaderViewController class uses\na ReaderDocument object to store information about the document and\nto keep track of document properties (thumb cache directory path,\nbookmarks and the current page number for example).\n\nAn initialized ReaderViewController can then be presented\nmodally, pushed onto a UINavigationController stack, placed in\na UITabBarController tab, or be used as a root view controller.\nPlease note that since ReaderViewController implements its own\ntoolbar, you need to hide the UINavigationController navigation\nbar before pushing it and then show the navigation bar after\npopping it. The ReaderDemoController class shows how this is\ndone with a bundled PDF file.\n\n### Required Files\n\nThe following files are required to incorporate the PDF\nreader into one of your projects:\n\n\tCGPDFDocument.h, CGPDFDocument.m\n\tReaderDocument.h, ReaderDocument.m\n\tReaderConstants.h, ReaderConstants.m\n\tReaderViewController.h, ReaderViewController.m\n\tReaderMainToolbar.h, ReaderMainToolbar.m\n\tReaderMainPagebar.h, ReaderMainPagebar.m\n\tReaderContentView.h, ReaderContentView.m\n\tReaderContentPage.h, ReaderContentPage.m\n\tReaderContentTile.h, ReaderContentTile.m\n\tReaderThumbCache.h, ReaderThumbCache.m\n\tReaderThumbRequest.h, ReaderThumbRequest.m\n\tReaderThumbQueue.h, ReaderThumbQueue.m\n\tReaderThumbFetch.h, ReaderThumbFetch.m\n\tReaderThumbRender.h, ReaderThumbRender.m\n\tReaderThumbView.h, ReaderThumbView.m\n\tReaderThumbsView.h, ReaderThumbsView.m\n\tThumbsViewController.h, ThumbsViewController.m\n\tThumbsMainToolbar.h, ThumbsMainToolbar.m\n\tUIXToolbarView.h, UIXToolbarView.m\n\n\tReader-Button-H.png, Reader-Button-H@2x.png, Reader-Button-H@3x.png\n\tReader-Button-N.png, Reader-Button-N@2x.png, Reader-Button-N@3x.png\n\tReader-Email.png, Reader-Email@2x.png, Reader-Email@3x.png\n\tReader-Export.png, Reader-Export@2x.png, Reader-Export@3x.png\n\tReader-Mark-N.png, Reader-Mark-N@2x.png, Reader-Mark-N@3x.png\n\tReader-Mark-Y.png, Reader-Mark-Y@2x.png, Reader-Mark-Y@3x.png\n\tReader-Print.png, Reader-Print@2x.png, Reader-Print@3x.png\n\tReader-Thumbs.png, Reader-Thumbs@2x.png, Reader-Thumbs@3x.png\n\n\tLocalizable.strings (UTF-16 encoding)\n\n### Required iOS Frameworks\n\nTo incorporate the PDF reader code into one of your projects,\nall of the following iOS frameworks are required:\n\n\tUIKit, Foundation, CoreGraphics, QuartzCore, ImageIO, MessageUI\n\n### Compile Time Options\n\nIn ReaderConstants.h the following #define options are available:\n\n`READER_FLAT_UI` - If TRUE, follows the Fuglyosity of Flat Fad\n(flattens the UI).\n\n`READER_SHOW_SHADOWS` - If TRUE, a shadow is shown around each page\nand page thumbnail.\n\n`READER_ENABLE_THUMBS` - If TRUE, a thumbs button is added to the main\ntoolbar enabling page thumbnail document navigation.\n\n`READER_DISABLE_RETINA` - If TRUE, sets the CATiledLayer contentScale\nto 1.0f. This effectively disables retina support and results in\nnon-retina device rendering speeds on retina display devices at\nthe loss of retina display quality.\n\n`READER_ENABLE_PREVIEW` - If TRUE, a medium resolution page thumbnail\nis displayed before the CATiledLayer starts to render the PDF page.\n\n`READER_DISABLE_IDLE` - If TRUE, the iOS idle timer is disabled while\nviewing a document (beware of battery drain).\n\n`READER_STANDALONE` - If FALSE, a \"Done\" button is added to the toolbar\nand the -dismissReaderViewController: delegate method is messaged when\nit is tapped.\n\n`READER_BOOKMARKS` - If TRUE, enables page bookmark support.\n\n### ReaderDocument Archiving\n\nTo change where the property list for ReaderDocument objects is stored\n(~/Library/Application Support/ by default), see the +archiveFilePath:\nmethod in the ReaderDocument.m source file. Archiving and unarchiving\nof the ReaderDocument object for a document is mandatory since this is\nwhere the current page number, bookmarks and directory of the document\npage thumb cache is kept.\n\n### Contact Info\n\nEmail: joklamcak(at)gmail(dot)com\n\nTwitter: [@joklamcak](https://twitter.com/joklamcak)\n\n### Acknowledgements\n\nThe PDF link support code in the ReaderContentPage class is based on\nthe links navigation code by Sorin Nistor from\n[http://ipdfdev.com/](http://ipdfdev.com/).\n\n### License\n\nThis code has been made available under the MIT License.\n","funding_links":[],"categories":["Media","Objective-C","etc"],"sub_categories":["PDF","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfr%2FReader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvfr%2FReader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfr%2FReader/lists"}