Git Product home page Git Product logo

Comments (2)

ranunez avatar ranunez commented on August 19, 2024

I'm a little confused about what the actual use case of this is. Right now PDFDocuments are created with a simple URL to the file. Normally if you have the PDF as raw data, you just save a temporary file in the caches directory and use that, so that you always have a reference to the file's contents and don't run into problems later on. Perhaps I need more information about the actual intended use case, but this seems like this adds unnecessary complexity to handle a rare and niche use case.

from ios-pdf-reader.

benbahrenburg avatar benbahrenburg commented on August 19, 2024

Hi @ranunez ,
You are correct that this is really an enterprise style feature. It is similar to how vfr reader creates their document (https://github.com/vfr/Reader/blob/master/Sources/CGPDFDocument.m). The big differences is instead of just creating a bunch of different init overrides I thought it might be easier to create a protocol strategy.

There are several reason the app might have a NSData object instead of a file URL. The biggest reason is that many applications have restrictions on writing sensitive data to disk. Others have to deal with creating CGPDFDocument directly, being able to display directly would be useful instead of having to flush to disk and re-read.

from ios-pdf-reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.