nextcloud / files_pdfviewer

:book: A PDF viewer for Nextcloud
GNU Affero General Public License v3.0
88 stars 44 forks source link

Some text is missing from certain PDFs when viewing them in Nextcloud #1001

Open raxod502 opened 2 months ago

raxod502 commented 2 months ago

Steps to reproduce

  1. Visit https://nextcloud.intuitiveexplanations.com/s/2obwcBsNM8kypfj

Expected behaviour

When I download the PDF and look at it, this is what it looks like:

image

The same is also seen when viewing the PDF in the official pdf.js test viewer: https://mozilla.github.io/pdf.js/web/viewer.html

Actual behaviour

When I view the PDF directly in Nextcloud, this is what it looks like, notice how most of the text is missing:

image

Server configuration

Operating system: Linux 5.14.0-447.el9.x86_64 x86_64

Web server: unsure as I do not have shell access

Database: mysql 10.6.18

PHP version: 8.2.20

Nextcloud version: 29.0.3

Where did you install Nextcloud from: https://www.pikapods.com/apps

List of activated apps:

``` Auditing / Logging Calendar Collabora Online - Built-in CODE Server Collaborative tags Comments Deleted files Federation File reminders Files download limit File sharing First run wizard Log Reader Monitoring Nextcloud announcements Nextcloud Office Notifications Password policy PDF viewer Privacy Recommendations Related Resources Share by mail Support Text Two-Factor TOTP Provider Usage survey User status Versions WebAppPassword ```

Nextcloud configuration:

``` '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'overwritehost' => 'nextcloud.intuitiveexplanations.com', 'overwriteprotocol' => 'https', 'overwrite.cli.url' => 'https://nextcloud.intuitiveexplanations.com/', 'trusted_proxies' => array ( 0 => '10.0.2.100', ), 'upgrade.disable-web' => true, 'instanceid' => 'redacted', 'passwordsalt' => 'redacted', 'secret' => 'redacted', 'trusted_domains' => array ( 0 => 'nextcloud-neue.intuitiveexplanations.com', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'mysql', 'version' => '29.0.3.4', 'dbname' => 'redacted', 'dbhost' => 'mysql.internal:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'redacted', 'dbpassword' => 'redacted', 'installed' => true, 'mail_from_address' => 'nextcloud', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_domain' => 'intuitiveexplanations.com', 'mail_smtphost' => 'smtp.fastmail.com', 'mail_smtpport' => '465', 'mail_smtpauth' => 1, 'mail_smtpname' => 'redacted', 'mail_smtppassword' => 'redacted', 'loglevel' => 2, 'maintenance' => false, 'app_install_overwrite' => array ( 0 => 'files_rightclick', ), ); ```

Client configuration

Browser: Firefox 128.0.2

Operating system: Pop!_OS 22.04 LTS

Logs

Nextcloud log (data/owncloud.log)

Last 1 month of logs, truncated to maximum width of 1,000 characters: https://paste.sr.ht/~raxod502/680a55b1e0b7518111dd4de5f547ad5351f806a9

Browser log

``` Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. node.js:416:1 [WARN] viewer: Some mimes were ignored because they are not enabled in the server previews config Object { app: "viewer", level: 2, ignoredMimes: (3) […] } viewer-main.mjs:44:184714 OCA.Viewer initialized viewer-main.mjs:2187:581 session heartbeat polling started session-heartbeat.js:103:9 This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. 2obwcBsNM8kypfj GET https://nextcloud.intuitiveexplanations.com/apps/files_sharing/publicpreview/2obwcBsNM8kypfj?x=1764&y=1170&a=true&file=%2FExample.pdf&scalingup=0 [HTTP/3 404 183ms] File info for / fetched Object { filename: "/", basename: "", lastmod: "Sat, 30 Mar 2024 16:55:27 GMT", size: 554923, type: "file", etag: "985cf7809f74bb68064d4875c3311ced", mime: "application/pdf", getcontentlength: 554923, getcontenttype: "application/pdf", getetag: '"985cf7809f74bb68064d4875c3311ced"', … } viewer-main.mjs:588:10834 Content-Security-Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive. Content-Security-Policy: Ignoring ‘unsafe-eval’ or ‘wasm-unsafe-eval’ inside “script-src-elem”. files_pdfviewer Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. stylesheets-manager.js:664:11 XHRGET https://nextcloud.intuitiveexplanations.com/apps/files_pdfviewer/js/pdfjs/web/locale/locale.properties?v=2.10.0 [HTTP/3 404 212ms] https://nextcloud.intuitiveexplanations.com/apps/files_pdfviewer/js/pdfjs/web/locale/locale.properties?v=2.10.0 not found. l10n.js:350:18 "en-us" resource not found l10n.js:352:18 #thumbs is undefined. l10n.js:828:14 #thumbs is undefined. l10n.js:900:14 #thumbs_label is undefined. l10n.js:828:14 #thumbs_label is undefined. l10n.js:900:14 #document_outline is undefined. l10n.js:828:14 #document_outline is undefined. l10n.js:900:14 #document_outline_label is undefined. l10n.js:828:14 #document_outline_label is undefined. l10n.js:900:14 #attachments is undefined. l10n.js:828:14 #attachments is undefined. l10n.js:900:14 #attachments_label is undefined. l10n.js:828:14 #attachments_label is undefined. l10n.js:900:14 #layers is undefined. l10n.js:828:14 #layers is undefined. l10n.js:900:14 #layers_label is undefined. l10n.js:828:14 #layers_label is undefined. l10n.js:900:14 #current_outline_item is undefined. l10n.js:828:14 #current_outline_item is undefined. l10n.js:900:14 #current_outline_item_label is undefined. l10n.js:828:14 #current_outline_item_label is undefined. l10n.js:900:14 #find_input is undefined. l10n.js:828:14 #find_input is undefined. l10n.js:900:14 #find_previous is undefined. l10n.js:828:14 #find_previous is undefined. l10n.js:900:14 #find_previous_label is undefined. l10n.js:828:14 #find_previous_label is undefined. l10n.js:900:14 #find_next is undefined. l10n.js:828:14 #find_next is undefined. l10n.js:900:14 #find_next_label is undefined. l10n.js:828:14 #find_next_label is undefined. l10n.js:900:14 #find_highlight is undefined. l10n.js:828:14 #find_highlight is undefined. l10n.js:900:14 #find_match_case_label is undefined. l10n.js:828:14 #find_match_case_label is undefined. l10n.js:900:14 #find_match_diacritics_label is undefined. l10n.js:828:14 #find_match_diacritics_label is undefined. l10n.js:900:14 #find_entire_word_label is undefined. l10n.js:828:14 #find_entire_word_label is undefined. l10n.js:900:14 #editor_free_text_color is undefined. l10n.js:828:14 #editor_free_text_color is undefined. l10n.js:900:14 #editor_free_text_size is undefined. l10n.js:828:14 #editor_free_text_size is undefined. l10n.js:900:14 #editor_ink_color is undefined. l10n.js:828:14 #editor_ink_color is undefined. l10n.js:900:14 #editor_ink_thickness is undefined. l10n.js:828:14 #editor_ink_thickness is undefined. l10n.js:900:14 #editor_ink_opacity is undefined. l10n.js:828:14 #editor_ink_opacity is undefined. l10n.js:900:14 #editor_stamp_add_image is undefined. l10n.js:828:14 #editor_stamp_add_image is undefined. l10n.js:900:14 #editor_stamp_add_image_label is undefined. l10n.js:828:14 #editor_stamp_add_image_label is undefined. l10n.js:900:14 #open_file is undefined. l10n.js:828:14 #open_file is undefined. l10n.js:900:14 #open_file_label is undefined. l10n.js:828:14 #open_file_label is undefined. l10n.js:900:14 #print is undefined. l10n.js:828:14 #print is undefined. l10n.js:900:14 #print_label is undefined. l10n.js:828:14 #print_label is undefined. l10n.js:900:14 #save is undefined. l10n.js:828:14 #save is undefined. l10n.js:900:14 #save_label is undefined. l10n.js:828:14 #save_label is undefined. l10n.js:900:14 #presentation_mode is undefined. l10n.js:828:14 #presentation_mode is undefined. l10n.js:900:14 #presentation_mode_label is undefined. l10n.js:828:14 #presentation_mode_label is undefined. l10n.js:900:14 #bookmark1 is undefined. l10n.js:828:14 #bookmark1 is undefined. l10n.js:900:14 #bookmark1_label is undefined. l10n.js:828:14 #bookmark1_label is undefined. l10n.js:900:14 #first_page is undefined. l10n.js:828:14 #first_page is undefined. l10n.js:900:14 #first_page_label is undefined. l10n.js:828:14 #first_page_label is undefined. l10n.js:900:14 #last_page is undefined. l10n.js:828:14 #last_page is undefined. l10n.js:900:14 #last_page_label is undefined. l10n.js:828:14 #last_page_label is undefined. l10n.js:900:14 #page_rotate_cw is undefined. l10n.js:828:14 #page_rotate_cw is undefined. l10n.js:900:14 #page_rotate_cw_label is undefined. l10n.js:828:14 #page_rotate_cw_label is undefined. l10n.js:900:14 #page_rotate_ccw is undefined. l10n.js:828:14 #page_rotate_ccw is undefined. l10n.js:900:14 #page_rotate_ccw_label is undefined. l10n.js:828:14 #page_rotate_ccw_label is undefined. l10n.js:900:14 #cursor_text_select_tool is undefined. l10n.js:828:14 #cursor_text_select_tool is undefined. l10n.js:900:14 #cursor_text_select_tool_label is undefined. l10n.js:828:14 #cursor_text_select_tool_label is undefined. l10n.js:900:14 #cursor_hand_tool is undefined. l10n.js:828:14 #cursor_hand_tool is undefined. l10n.js:900:14 #cursor_hand_tool_label is undefined. l10n.js:828:14 #cursor_hand_tool_label is undefined. l10n.js:900:14 #scroll_page is undefined. l10n.js:828:14 #scroll_page is undefined. l10n.js:900:14 #scroll_page_label is undefined. l10n.js:828:14 #scroll_page_label is undefined. l10n.js:900:14 #scroll_vertical is undefined. l10n.js:828:14 #scroll_vertical is undefined. l10n.js:900:14 #scroll_vertical_label is undefined. l10n.js:828:14 #scroll_vertical_label is undefined. l10n.js:900:14 #scroll_horizontal is undefined. l10n.js:828:14 #scroll_horizontal is undefined. l10n.js:900:14 #scroll_horizontal_label is undefined. l10n.js:828:14 #scroll_horizontal_label is undefined. l10n.js:900:14 #scroll_wrapped is undefined. l10n.js:828:14 #scroll_wrapped is undefined. l10n.js:900:14 #scroll_wrapped_label is undefined. l10n.js:828:14 #scroll_wrapped_label is undefined. l10n.js:900:14 #spread_none is undefined. l10n.js:828:14 #spread_none is undefined. l10n.js:900:14 #spread_none_label is undefined. l10n.js:828:14 #spread_none_label is undefined. l10n.js:900:14 #spread_odd is undefined. l10n.js:828:14 #spread_odd is undefined. l10n.js:900:14 #spread_odd_label is undefined. l10n.js:828:14 #spread_odd_label is undefined. l10n.js:900:14 #spread_even is undefined. l10n.js:828:14 #spread_even is undefined. l10n.js:900:14 #spread_even_label is undefined. l10n.js:828:14 #spread_even_label is undefined. l10n.js:900:14 #document_properties is undefined. l10n.js:828:14 #document_properties is undefined. l10n.js:900:14 #document_properties_label is undefined. l10n.js:828:14 #document_properties_label is undefined. l10n.js:900:14 #toggle_sidebar is undefined. l10n.js:828:14 #toggle_sidebar is undefined. l10n.js:900:14 #toggle_sidebar_label is undefined. l10n.js:828:14 #toggle_sidebar_label is undefined. l10n.js:900:14 #findbar is undefined. l10n.js:828:14 #findbar is undefined. l10n.js:900:14 #findbar_label is undefined. l10n.js:828:14 #findbar_label is undefined. l10n.js:900:14 #previous is undefined. l10n.js:828:14 #previous is undefined. l10n.js:900:14 #previous_label is undefined. l10n.js:828:14 #previous_label is undefined. l10n.js:900:14 #next is undefined. l10n.js:828:14 #next is undefined. l10n.js:900:14 #next_label is undefined. l10n.js:828:14 #next_label is undefined. l10n.js:900:14 #page is undefined. l10n.js:828:14 #page is undefined. l10n.js:900:14 #open_file is undefined. l10n.js:828:14 #open_file is undefined. l10n.js:900:14 #open_file_label is undefined. l10n.js:828:14 #open_file_label is undefined. l10n.js:900:14 #print is undefined. l10n.js:828:14 #print is undefined. l10n.js:900:14 #print_label is undefined. l10n.js:828:14 #print_label is undefined. l10n.js:900:14 #save is undefined. l10n.js:828:14 #save is undefined. l10n.js:900:14 #save_label is undefined. l10n.js:828:14 #save_label is undefined. l10n.js:900:14 #editor_free_text2 is undefined. l10n.js:828:14 #editor_free_text2 is undefined. l10n.js:900:14 #editor_free_text2_label is undefined. l10n.js:828:14 #editor_free_text2_label is undefined. l10n.js:900:14 #editor_ink2 is undefined. l10n.js:828:14 #editor_ink2 is undefined. l10n.js:900:14 #editor_ink2_label is undefined. l10n.js:828:14 #editor_ink2_label is undefined. l10n.js:900:14 #editor_stamp1 is undefined. l10n.js:828:14 #editor_stamp1 is undefined. l10n.js:900:14 #editor_stamp1_label is undefined. l10n.js:828:14 #editor_stamp1_label is undefined. l10n.js:900:14 #tools is undefined. l10n.js:828:14 #tools is undefined. l10n.js:900:14 #tools_label is undefined. l10n.js:828:14 #tools_label is undefined. l10n.js:900:14 #zoom_out is undefined. l10n.js:828:14 #zoom_out is undefined. l10n.js:900:14 #zoom_out_label is undefined. l10n.js:828:14 #zoom_out_label is undefined. l10n.js:900:14 #zoom_in is undefined. l10n.js:828:14 #zoom_in is undefined. l10n.js:900:14 #zoom_in_label is undefined. l10n.js:828:14 #zoom_in_label is undefined. l10n.js:900:14 #zoom is undefined. l10n.js:828:14 #zoom is undefined. l10n.js:900:14 #page_scale_auto is undefined. l10n.js:828:14 #page_scale_auto is undefined. l10n.js:900:14 #page_scale_actual is undefined. l10n.js:828:14 #page_scale_actual is undefined. l10n.js:900:14 #page_scale_fit is undefined. l10n.js:828:14 #page_scale_fit is undefined. l10n.js:900:14 #page_scale_width is undefined. l10n.js:828:14 #page_scale_width is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #page_scale_percent is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:900:14 #password_label is undefined. l10n.js:828:14 #password_label is undefined. l10n.js:900:14 #password_cancel is undefined. l10n.js:828:14 #password_cancel is undefined. l10n.js:900:14 #password_ok is undefined. l10n.js:828:14 #password_ok is undefined. l10n.js:900:14 #document_properties_file_name is undefined. l10n.js:828:14 #document_properties_file_name is undefined. l10n.js:900:14 #document_properties_file_size is undefined. l10n.js:828:14 #document_properties_file_size is undefined. l10n.js:900:14 #document_properties_title is undefined. l10n.js:828:14 #document_properties_title is undefined. l10n.js:900:14 #document_properties_author is undefined. l10n.js:828:14 #document_properties_author is undefined. l10n.js:900:14 #document_properties_subject is undefined. l10n.js:828:14 #document_properties_subject is undefined. l10n.js:900:14 #document_properties_keywords is undefined. l10n.js:828:14 #document_properties_keywords is undefined. l10n.js:900:14 #document_properties_creation_date is undefined. l10n.js:828:14 #document_properties_creation_date is undefined. l10n.js:900:14 #document_properties_modification_date is undefined. l10n.js:828:14 #document_properties_modification_date is undefined. l10n.js:900:14 #document_properties_creator is undefined. l10n.js:828:14 #document_properties_creator is undefined. l10n.js:900:14 #document_properties_producer is undefined. l10n.js:828:14 #document_properties_producer is undefined. l10n.js:900:14 #document_properties_version is undefined. l10n.js:828:14 #document_properties_version is undefined. l10n.js:900:14 #document_properties_page_count is undefined. l10n.js:828:14 #document_properties_page_count is undefined. l10n.js:900:14 #document_properties_page_size is undefined. l10n.js:828:14 #document_properties_page_size is undefined. l10n.js:900:14 #document_properties_linearized is undefined. l10n.js:828:14 #document_properties_linearized is undefined. l10n.js:900:14 #document_properties_close is undefined. l10n.js:828:14 #document_properties_close is undefined. l10n.js:900:14 #editor_alt_text_dialog_label is undefined. l10n.js:828:14 #editor_alt_text_dialog_label is undefined. l10n.js:900:14 #editor_alt_text_dialog_description is undefined. l10n.js:828:14 #editor_alt_text_dialog_description is undefined. l10n.js:900:14 #editor_alt_text_add_description_label is undefined. l10n.js:828:14 #editor_alt_text_add_description_label is undefined. l10n.js:900:14 #editor_alt_text_add_description_description is undefined. l10n.js:828:14 #editor_alt_text_add_description_description is undefined. l10n.js:900:14 #editor_alt_text_textarea is undefined. l10n.js:828:14 #editor_alt_text_textarea is undefined. l10n.js:900:14 #editor_alt_text_mark_decorative_label is undefined. l10n.js:828:14 #editor_alt_text_mark_decorative_label is undefined. l10n.js:900:14 #editor_alt_text_mark_decorative_description is undefined. l10n.js:828:14 #editor_alt_text_mark_decorative_description is undefined. l10n.js:900:14 #editor_alt_text_cancel_button is undefined. l10n.js:828:14 #editor_alt_text_cancel_button is undefined. l10n.js:900:14 #editor_alt_text_save_button is undefined. l10n.js:828:14 #editor_alt_text_save_button is undefined. l10n.js:900:14 #print_progress_message is undefined. l10n.js:828:14 #print_progress_message is undefined. l10n.js:900:14 #print_progress_percent is undefined. l10n.js:828:14 #print_progress_percent is undefined. l10n.js:900:14 #print_progress_close is undefined. l10n.js:828:14 #print_progress_close is undefined. l10n.js:900:14 #page_scale_auto is undefined. l10n.js:828:14 #page_scale_actual is undefined. l10n.js:828:14 #page_scale_fit is undefined. l10n.js:828:14 #page_scale_width is undefined. l10n.js:828:14 #of_pages is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:828:14 #of_pages is undefined. l10n.js:828:14 #page_scale_percent is undefined. l10n.js:828:14 #thumb_page_title is undefined. l10n.js:828:14 #page_landmark is undefined. l10n.js:828:14 #page_scale_percent is undefined. 2 l10n.js:828:14 PDF 30342d35392d41322d41422d41422d30 [1.7 Aspose.PDF for .NET 21.1 / Aspose Ltd.] (PDF.js: 3.11.174 [ce8716743]) app.js:1605:12 Warning: Interactive form support is not enabled app.js:1648:14 ```
joshtrichards commented 1 week ago

Possibly related: #954