<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>260019</bug_id>
          
          <creation_ts>2023-08-10 03:33:08 -0700</creation_ts>
          <short_desc>[WPE][GTK] There should be an easily accessible way to disable pdf.js at runtime</short_desc>
          <delta_ts>2026-03-16 07:37:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>PDF</component>
          <version>Other</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Demlon">m</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ntim</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1970475</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Demlon">m</who>
    <bug_when>2023-08-10 03:33:08 -0700</bug_when>
    <thetext>I prefer my local PDF viewer over pdf.js and would like my browser (in case it matters: luakit) to directly hand through PDFs to it.  I have groped around in the Webkit source a bit, but all I could find was the build-time ENABLED(PDF) switches – which is not helpful in my case, as I would like to keep using my distribution&apos;s packages), and grepping for enable-something in the built libwebkitgtk did not yield anything either.

So... can we have a pdf.js-switch?  Or could the the pdf.js machinery at
least honour the enable-plugins setting?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971786</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-17 03:34:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/114018319&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984832</commentid>
    <comment_count>2</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2023-10-13 03:10:26 -0700</bug_when>
    <thetext>Also reported downstream in Debian recently for WebKitGTK: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053713</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984858</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-10-13 05:42:13 -0700</bug_when>
    <thetext>There is a PdfJSViewerEnabled setting for this, but it&apos;s not exposed for WPE/GTK APIs. This would be a good first pull request for anyone interested in contributing. Add the setting to WebKitSettings.h.in and WebKitSettings.cpp, then add a sanity-check test to TestWebKitSettings.cpp just to ensure that toggling the setting works. Most of the work will be copy/pasting from an existing setting and then renaming things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984932</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-10-13 10:56:51 -0700</bug_when>
    <thetext>OK, this can sort of be done already using webkit_settings_get_all_features(), iterate through the list until you find PdfJSViewerEnabled, and then webkit_settings_set_feature_enabled(). That&apos;s not very convenient, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190520</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2026-03-16 03:17:24 -0700</bug_when>
    <thetext>Another related request is whether WebKit can be built to use pdf.js as provided by the distro instead of bundling its own copy inside the binary:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1130768</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190572</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2026-03-16 07:37:11 -0700</bug_when>
    <thetext>I don&apos;t think that&apos;s related to this bug at all.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>