IsaacSchemm / pdf.js-seamonkey

SeaMonkey fork of pdf.js
Apache License 2.0
25 stars 4 forks source link

Only endless idling instead of showing PDF #5

Closed RainerBielefeld closed 4 years ago

RainerBielefeld commented 4 years ago

In my German SeaMonkey Blog I read about the problem that this PDF viewer does no longer work with SM Version 2.53.1.

Steps how to with unzippedunofficial (by wg9s)DeSeaMonkey 2.53.1(NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build 20191115130006 (Default Classic Theme) on German WIN7 64bit:

  1. Install PDF Viewer PDF Viewer 2.2.253 here from Github
  2. Try to open This PDF » Expected: PDF viewer UI opens in BROWSER TAB, PDF contents shown » Actual: PDF contents not shown.

Additional Info: a) Error console shows Zeitstempel: 01.12.2019, 16:45:47 Fehler: SyntaxError: missing ) after argument list Quelldatei: chrome://prefbar/content/buttonCommands.js Zeile: 426

Any more Examination I can do to help to fixthe problem?

IsaacSchemm commented 4 years ago

Do older versions of the extension work?

If there is something broken with the newer versions of pdf.js, I doubt I'll be able to fix it. All I was really doing was putting newer pdf.js versions inside of the old Firefox XUL extension - I don't know a whole lot about how pdf.hs works. But if there's a change in SeaMonkey itself that caused it to stop working, maybe it might be an easier fix? Hard to tell at this point.

RainerBielefeld commented 4 years ago

Hi Isaac, in my Blog we have some more information: PDF Viewer never worked in 2.53 - problem seems SM Related

And a 2 workarounds:

Workaround 1

During endless idling click 'Stop Loading Page' icon in SM Navigaton Bar: PDF contents will appear

Workaround 2

Telegram style as I understood the workaround by frg:

In installed Extension (in User Profile) in internal file 'PdfStreamConverter.jsm' replace both calls "if (PdfjsContentUtils.isRemote)" by "if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT)"

I replaced both strings "if (PdfjsContentUtils.isRemote)" by "if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT)", but that did not work forme. May be Imadea mistake?

Workaround 2 only works for calls inBrowser, not in mail

CU

Rainer

IsaacSchemm commented 4 years ago

Try this version and see if it helps. I integrated workaround 2 into the extension.

https://github.com/IsaacSchemm/pdf.js-seamonkey/releases/tag/v2.2.254

dilworks commented 4 years ago

Works for me here, thank you very much~!

A gotcha: remember to uninstall any old Mozilla build of pdf.js before installing this fork!