A simple SwiftUI application demonstrating how to use the Apryse PDF SDK to view PDF files.
- Main screen with multiple buttons to open different PDF files
- Modal screen that displays a PDF using the PDFView component
- Support for PDFs of various sizes (from small samples to 200-page documents)
- Organized interface with categorized PDF options
- Clone the repository
- Open the project in Xcode
- Make sure the Resources directory is included in the app bundle:
- In Xcode, go to the project navigator
- Select the project file
- Go to the "Build Phases" tab
- Expand "Copy Bundle Resources"
- Click the "+" button and add the Resources directory
- Launch the app
- The main screen displays multiple buttons for different PDF files
- Click on any button to open the corresponding PDF
- The selected PDF will open in a modal screen
- Click the "Close" button to return to the main screen
- Select a different PDF button to view another document
The app includes multiple PDF files in the Resources directory:
- Sample PDF files (sample, sample1, sample2, sample3, sample4)
- Various sized PDFs (10, 20, 30, 50, and 200 pages)
- An invalid PDF file for testing error handling
To add more PDF files to the application:
- Add the PDF files to the Resources directory
- Update the
pdfFiles
array in ContentView.swift to include the new file names - Add new buttons in the UI for the new PDF files
- iOS 15.0+
- Xcode 13.0+
- Swift 5.5+
- Apryse PDF SDK