google / samba-documents-provider

Access network file shares directly from the Android Downloads/Files app
GNU General Public License v3.0
638 stars 125 forks source link

file reading/decoding fails #53

Open jmue opened 6 years ago

jmue commented 6 years ago

Opening the pdf-file from https://tcpdf.org/examples/example_065/ with Androids build-in PDF-Viewer (com.google.android.apps.pdfviewer) fails not only on preO (no seekable streams) but also on Oreo (API27).

Steps to reproduce:

  1. Copy the pdf-file from https://tcpdf.org/examples/example_065/ to a samba share. Use files app to open the document -> Toast about invalid format
  2. Copy the pdf file to a local folder (like Downloads) -> opening pdf succeeds
jmue commented 6 years ago

It shows that all seeking has no effect on the native side. The fd offset stays at totoal bytes read count. I'm using NDK ver 16.1.4479499 and samba source version 4.5.16.