nextcloud / nextcloud/files_pdfviewer
Render first page before download is complete (linear / web optimized)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 108
- Forks
- 61
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 29
Description
Without Linear PDF feature most of the PDFs (especially with pictures) loads very slowly. According to the console's information, pdf.js version of this plug-in is 2.1.266, but the current version of pdf.js is 2.5.179, which supports pdf.js.
Steps to reproduce
- Load any Linearized PDF to storage (or use my PDF)
- Check how slowly it loads
- Upload to any host and check how fast your browser can load the first page, while loading other pages
Expected behaviour
Linear PDF support in PDF viewer.
Actual behaviour
Lack of Linear PDF support, and slow loadings...
Server configuration
Operating system: Linux 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64
Web server: nginx/1.17.10 (fpm-fcgi)
Database: mysql 8.0.20
PHP version: 7.4.7
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, json, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache
Nextcloud version: 18.0.7 - 18.0.7.1
Where did you install Nextcloud from: from official website
List of activated apps:
Enabled:
- accessibility: 1.4.0
- activity: 2.11.0
- bruteforcesettings: 1.6.0
- cloud_federation_api: 1.1.0
- comments: 1.8.0
- dav: 1.14.0
- federatedfilesharing: 1.8.0
- federation: 1.8.0
- files: 1.13.1
- files_pdfviewer: 1.7.0
- files_rightclick: 0.15.2
- files_sharing: 1.10.1
- files_trashbin: 1.8.0
- files_versions: 1.11.0
- files_videoplayer: 1.7.0
- firstrunwizard: 2.7.0
- issuetemplate: 0.6.0
- logreader: 2.3.0
- lookup_server_connector: 1.6.0
- nextcloud_announcements: 1.7.0
- notifications: 2.6.0
- oauth2: 1.6.0
- password_policy: 1.8.0
- photos: 1.0.0
- privacy: 1.2.0
- provisioning_api: 1.8.0
- recommendations: 0.6.0
- serverinfo: 1.8.0
- settings: 1.0.0
- sharebymail: 1.8.0
- support: 1.1.1
- survey_client: 1.6.0
- systemtags: 1.8.0
- text: 2.0.0
- theming: 1.9.0
- twofactor_backupcodes: 1.7.0
- updatenotification: 1.8.0
- viewer: 1.2.0
- workflowengine: 2.0.0
Disabled: - admin_audit
- encryption
- files_external
- user_ldap
Nextcloud configuration:
{
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"cloud.sonic.fan"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "18.0.7.1",
"overwrite.cli.url": "https://cloud.sonic.fan",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"memcache.local": "\OC\Memcache\Memcached",
"memcache.distributed": "\OC\Memcache\Memcached",
"memcached_servers": [
[
"localhost",
11211
]
],
"theme": "",
"loglevel": 2,
"maintenance": false,
"updater.secret": "REMOVED SENSITIVE VALUE",
"updater.release.channel": "stable"
}
Client configuration
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Operating system: Windows 10 Pro x64
Logs
Nextcloud log (data/owncloud.log)
There is no log for this.
Browser log
Version string from console: "(PDF.js: 2.1.266)"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named in the report. Start by locating the PDF.js integration and its loading path, using the reported 2.1.266 version and linearized PDFs as the baseline. Done means the first page renders before the complete PDF download while later pages continue loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100