Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Besjan
    @Besjan

    Tried in a new project, where I added PDFReader with Unity v5.6.1 and also updated android sdk to v26, device Nexus 9 Android v7.1.1.
    With no changes, it throws the same error.
    Tried modifying AndroidManifest by adding:

        <provider
          android:name="android.support.v4.content.FileProvider"
          android:authorities="com.c.pn.provider"
          android:exported="false"
          android:grantUriPermissions="true">
          <meta-data
              android:name="android.support.FILE_PROVIDER_PATHS"
              android:resource="@xml/provider_paths"/>
        </provider>

    But it doesn't build and fails to recognize resources:

    stderr[
    AndroidManifest.xml:7: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths').

    ]

    Yaroslav Petrichka
    @slavaobninsk
    Send screenshot with your project structure
    Besjan
    @Besjan
    I imported PDFReader in a new unity project and the only thing I changed was the bundle id: com.c.pn
    Besjan
    @Besjan
    @slavaobninsk have you actually tested it in Android 7.x? If so, can you please provide your project? Thanks.
    Yaroslav Petrichka
    @slavaobninsk
    Yes in all my customers it's work
    Yaroslav Petrichka
    @slavaobninsk
    I try it on unity 5.6.2 and it's build ok
    you can watch import process on video
    Besjan
    @Besjan
    I'll try 5.6.2, thanks for your patience.
    Besjan
    @Besjan

    @slavaobninsk

    1. Created new project with Unity v5.6.2
    2. Imported latest PDFReader
    3. Build And Run
    4. Android 5.x and 6.x works fine
    5. Android 7.x fails (specifically Nexus 9 with Android 7.1.1)
    6. Error: android.os.FileUriExposedException

    Can you please provide the apk you built in the video, so I can test your version, thanks.

    Stefano Cecere
    @StefanoCecere
    i have discovered the same problem under Android 7 ( AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference). under Android 5/6 it works well.. i applied the <provider> patch to the Manifesto.. but nothing :( i am trying building a fresh empty project with just PDFReader to see if there is some conflict with other Android plugin...
    Stefano Cecere
    @StefanoCecere
    ok in a clean project it works.. m problem is that i have 12 android plugins (mostly .aar9 in my project.. and another is overriding the main Unity Activity.. so i guess there is some conflict somewhere
    Daniel Cires
    @daniel_cires_twitter
    Hi everyone, iI try to open a local pdf location in persistentdatapath but show me this error:
    2018-02-05 08:24:56.503761+0100 3DJointsTool[308:35093] Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 nan; 812 375]' First throw call stack:
    (0x18485a364 0x183aa0528 0x18485a2ac 0x1888a68cc 0x1888985c0 0x18dd87634 0x18dd94ff0 0x18dd59e90 0x18decf3d8 0x18e09dfe4 0x106718254 0x188787710 0x18883bc5c 0x1847e8290 0x184803000 0x184802704 0x1848001d8 0x18471fe58 0x1865ccf84 0x18dd9f67c 0x102f54e5c 0x18423c56c)
    libc++abi.dylib: terminating with uncaught exception of type NSException
    and this is the code
    StartCoroutine(PDFReader.DownloadPDF(directory+orfilename, "remoteName"));
    PDFReader.OpenDocInWebViewLocal(PDFReader.PersistentDataPath + "/" + "remoteName.pdf", orfilename);
    Yaroslav Petrichka
    @slavaobninsk
    Hello please attach pdf file
    BylKus
    @BylKus

    When I use "PDFReader.OpenDocInWebViewLocal", I have the same issue as Daniel.
    When I use "PDFReader.OpenDocInMenu", I clic on "Copy to iBooks" but nothing append. I can only clic on create PDF to view the pdf.

    I use your "test.pdf" file. I'm on iPad 11.1 and Xcode 9.1.

    Yaroslav Petrichka
    @slavaobninsk
    Hello PDFReader.OpenDocInMenu not open in iBooks, because it's iOS 11 Apple now it and fix in next release
    StartCoroutine(PDFReader.DownloadPDF(directory+orfilename, "remoteName"));
    PDFReader.OpenDocInWebViewLocal(PDFReader.PersistentDataPath + "/" + "remoteName.pdf", orfilename);
    You must pass not "directory+orfilename"
    Use full url for example
    Sebastian Garcia
    @l_sebastian_l_twitter

    Hi, when opening with PDFReader and default Google Drive stays on black screen, but when you open the file directly from Google Drive if you open the PDF correctly.

    What's going on?

    James Dessart
    @jdessartcs

    Hi, I'm having the same trouble as Daniel, with the NaN error on iOS. This is the line that calls PDFReader:

    PDFReader.OpenDocInWebViewLocal(url, "Document");

    Where url is the location of a local file. I handle downloads separately.

    James Dessart
    @jdessartcs
    Couple of notes:
    • when I use PDFReader.OpenDocInMenu with the same URL, there's no issue
    • I tried changing the nav bar offset, but that had no effect
    • the file is readable by iBooks on the same phone
    Michael Blatz
    @mischaall_twitter

    Hi there.
    I've also got the Android 7 problem. Currently, the most recent version of PDFReader is installed.
    On Android 6 and lower it all works perfectly. On iOS the same.

    I have this part in my Manifest:

         <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="com.SlavaObninsk.Test.provider"
            android:exported="false"
            android:grantUriPermissions="true">
          <meta-data
              android:name="android.support.FILE_PROVIDER_PATHS"
              android:resource="@xml/provider_paths"/>
          </provider>

    It works to build a project but it's giving me the following error:

    AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
    at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:561)
    at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:535)
    at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
    at com.SlavaObninsk.pdfreader.Logic.OpenDocLocal(Logic.java:60)
    at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    at com.unity3d.player.UnityPlayer.c(Unknown Source)
    at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
    at android.os.MessageQueue.next(Message

    @slavaobninsk What can I do?

    Michael Blatz
    @mischaall_twitter
    I've got a small correction: I have changed "com.SlavaObninsk.Test.provider" to my case "de.swr.wizadora".
    or do I need to attach something like ".fileprovider" (so in my case: "de.swr.wizadora.fileprovider")?
    Yaroslav Petrichka
    @slavaobninsk
    de.swr.wizadora.fileprovider
    bundlename.provider
    Sebastian Garcia
    @l_sebastian_l_twitter
    Screenshot_20181005-151413.png
    Hi, one of the void OpenDocLocal() functions does not work on Android 8 with the default Google reader.
    Sebastian Garcia
    @l_sebastian_l_twitter
    Screenshot_20181009-125757.png
    Stefano Cecere
    @StefanoCecere
    hi @slavaobninsk with Unity 2018 and iOS 12 we can't build since ERROR: Undefined symbols for architecture arm64:
    "_OBJCCLASS$_MFMailComposeViewController", referenced from:
    objc-class-ref in libPDFReader.a(PDFReader.o)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    is this plugin still maintaned or shoudl we look for alternatives? could you eventually share the source code of libPDFReader.a so that we can fix it?
    Yaroslav Petrichka
    @slavaobninsk
    Add MessageUI.framework to Xcode project
    Stefano Cecere
    @StefanoCecere
    ahh thank you @slavaobninsk ! shoudl we update somewhere the docs? last update is from april 2017..... and this is the only real pdf plugin for Unity (the alternative is a native renderer)... ughmm
    Stefano Cecere
    @StefanoCecere
    anybody with the iOS issue Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 nan; 812 375]', the solution is to call PDFReader.SetWebviewPageOffset(2, completefilePath); just after the PDFReader.OpenDocInWebViewLocal().
    Korion Games
    @KorionG_twitter

    Hi there!
    We are using PDFReader for a while now, but we are currently facing a problem since upgrading to Unity 2018.3

    1. UnityPlayerNativeActivity has thrown an error.
      The solution is easy because Unity changed the class name to UnityPlayerActivity. So you can just upgrade it and you are ready to go.

    But the main problem is the following:
    Everytime when I try to open a PDF file, the console says:
    /my.bundle.name I/PDFReader: Activity error = No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///storage/emulated/0/Android/data/my.bundle.name/files/pdf/Wz_lkjh_Zertifikat_Wembley.pdf typ=application/pdf flg=0x4000000 }

    I controlled if the file exists and yes: The file exists and I can open it via AcrobatReader without any problems. The path is correct so far. What could be the problem here?

    Korion Games
    @KorionG_twitter
    This is on emulator. On device it seems to have a "permission denied" error
    Korion Games
    @KorionG_twitter
    As a small hint: This also happens with your sample, so this doesn't seem to be only an issue with my pdf. I definitely need "OpenLocal" for my PDF files.
    stansison
    @serui
    Hi, possible new buyer for this app. Is this still being actively supported?
    Makn question. The app lists being able to open and write pdfs, i just want to clarify, are the text parsable?
    Korion Games
    @KorionG_twitter
    @serui It doesn't seem so, which is really bad. It's not possible to view any PDFs on Android using this asset (if not using Acrobat). The worst is, we don't see any chance to get this working without a patch or support from the developers. We can't and don't want to recommend every user to download Acrobat Reader.
    Stefano Cecere
    @StefanoCecere
    hi.. Unity 2019 coudl anybody build Android with IL2CPP ? with Mono it compiles well ...
    ngiani
    @ngiani
    Hi. Is it possible to convert a pdf into an array of images with this asset ?
    bakalarczuk
    @bakalarczuk
    I purchased a library just for this: Undefined symbols for architecture arm64:
    "_OBJCCLASS$_MFMailComposeViewController", referenced from:
    objc-class-ref in libPDFReader.a(PDFReader.o)
    And there is no QA page with answer for it
    Diego Enrique
    @14182Diego_twitter
    Hello, i purchased the PDFReader for Unity 2019.2.20f1 but i get Field currentActivity or type signature not found, tried changing Unity version but it doesn't work. The QA PAGE also isn't working.