Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11773 Reply

    Tom

    Hello,

    i would like to open an file from the documents folder inside my app. But when ill try with:

    let plugPDFController = PlugPDFDocumentViewController.initWithPath(filepath.absoluteString, password: “”, title: document_title)
    if(plugPDFController != nil) {
    self.navigationController?.pushViewController(plugPDFController!, animated: true)
    }

    i am always getting the error:

    *** Terminating app due to uncaught exception ‘CorruptedPDF’, reason: ‘Thrown when a pass-in data or file is not PDF document or corrupted.’

    I am not using a file inside my project (as bundle) – is it impossible to use an file from the documents folder inside my app?

    Thanks in advance.

    ‘Thrown when a pass-in data or file is not PDF document or corrupted.’

    #11775 Reply

    Dr. Plug
    Moderator

    Hello Tom,

    Thank you for your interest in the PlugPDF SDK.

    The exception comes from the broken PDF file or not a PDF file.
    I can guess that you are trying to open a not PDF document or corrupted PDF file.
    Although we have some methods to repair the broken PDF files, we cannot repair all types of the broken PDF files.
    So, I recommend you to use proper PDF document to open with the PlugPDF SDK.
    Also, you can put a PDF file in your app and open a PDF file.

    If you have any further question or concern, please let me know.

    Dr, Plug
    PlugPDF Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: 'Thrown when a pass-in data or file is not PDF document or corrupted.'
Your information: