Blog Post

PSPDFKit for E-Learning

Illustration: PSPDFKit for E-Learning

PSPDFKit is used by thousands of apps and millions of end users across different industries like aviation, board meetings, construction, e-learning, e-readers, and magazines.

In this post, we’ll see how to configure PSPDFKit for the education industry and how we can create an e-learning iOS application for taking and grading a geography quiz with just a few lines of code.

Let’s get started!

ℹ Info: You can build the PSPDFKit Catalog app on your iOS device or Simulator to explore the e-learning example, and you can find the source code in ElearningExample.swift. You can also install PDF Viewer from the App Store on your iOS device and open the e-learning example via Settings > PSPDFKit Catalog.

The Use Case

When you first open the e-learning example from the Catalog app, you’ll see the student document, which is a geography quiz a student is taking.

As a student, to complete the quiz, you can perform operations on the document like filling out forms and adding annotations and bookmarks. When you’ve finished, you can switch to the teacher document to submit the exam, and you’ll then see what the teacher is seeing when they’re grading the exam.

Notice that all the changes you’ve made to the student document are transferred over to the teacher document. And if you’ve zoomed in on a specific portion of the page, the viewport is transferred from the student document to the teacher document.

ℹ Info: This example uses PSPDFKit’s Viewer, Annotations, and Forms components.

Transferring the Data

In this example, we transfer the data from the student document to the teacher document using local variables to simplify the codebase. However, in a real-world e-learning application, you may want to send and persist the data to your backend on a server.

For use cases like our e-learning application, we recommend transferring just the exam’s relevant data (forms field values, annotations, and bookmarks) instead of uploading the entire student document. For this specific example, where we have a single student and a single teacher, it may not be a big issue. However, in a real-life scenario, a teacher usually has multiple students, and uploading multiple documents may not be very efficient.

To illustrate this, let’s discuss the following scenario where a teacher has 30 students.

If each student were to upload their quiz file (about 1.5 MB on disk), this specific quiz would take about 45 MB of storage on your servers. This can quickly scale up and impact your servers when dealing with hundreds of teachers and thousands of students.

Uploading the entire student quiz file also impacts the student’s experience for two reasons:

  1. It takes longer to upload.

  2. It may be a concern for students who use a limited cellular data plan.

PSPDFKit offers many ways to transfer from one document to another. For example, PSPDFKit Instant is our in-house syncing solution for seamless collaboration using PSPDFKit-powered apps. There’s also Instant JSON, which is our approach to bringing annotations into a modern format.

For this use case, we could use the Instant JSON approach: The Instant JSON payload for the quiz takes up a few kilobytes, making Instant JSON an efficient solution for transferring data over the network or storing it on your servers.

Conclusion

In this post, we talked about how to transfer data between student and teacher documents. If you want to find out what else is possible, the e-learning example uses additional PSPDFKit APIs, which showcase how to prerender and cache documents and how to customize the toolbar.

To learn more about how PSPDFKit can help you improve your e-learning app, test out our Catalog app, head over to our documentation, or reach out to us on support.

If you’re curious about how PSPDFKit is used in other industries, please take a look at our other blog posts from this series:

Explore related topics

Share post
Free trial Ready to get started?
Free trial