Forum moved here!

# Home / How do I View a web site DjVu document?

nautili

When I navigate to a web page that requires a DjVu viewer I get an error message even after installing and opening Sumatra. I use Mozilla but have also tried Chrome and Explorer. Is there a way to copy the URL into Sumatra? I wasn’t able to find such a feature. It is probably something simple and I lack the experience. I hope someone can help. Below is the link if it helps to have an example (old Italian newspaper).

http://emeroteca.braidense.it/gea/sfoglia_fascicolo.php?IDTestata=367&CodScheda=00DD&SearchString=mantova&SearchField=titolo&PageRec=25&PageSel=1&PB=1&Anno=1898&Mese=11&Giorno=26_27&IDG=71865&RecSel=3

Thanks very much!
Jon

GitHubRulesOK

DjVu files are often DRM protected

The link you give seems to lead to such a small stub that requires the server to allow you to see further data

To test SumatraPDF can load a standard DjVu file use File Open and tell it to open the following filename as an HTTP://… to check it works. Note the following example web link may still be working, However, now 2021, it still uses Http rather than preferred Https?

http://www.djvu.org/docs/DjVu_Tech_Primer.djvu

A similar example of the type files you are trying to download can be found on the following page where the browser can load the DRM stub as FASC ( fascicules) OR you can download the document as a zip full of djvu files that SumatraPDF WILL open locally http://kpbc.umk.pl/dlibra/doccontent?id=689

SumatraPeter

Some observations:

1. Sumatra no longer provides a browser plugin (it used to have one for Firefox but that’s long gone).

2. Even after saving that DJVU locally and opening it Sumatra says it “Couldn’t render the page”, so I guess the app has an issue with this specific file or others like it (probably they’re DRM-protected) and not with DJVUs in general.

kjk

I looked at this file. It’s not DRM encrypted but it’s a special index type of djvu file that only points to 4 other files.

If those 4 files were present on the disk, Sumatra would open them.

Unfortunately, I don’t see a way to download them from that page. I figured out that e.g. the first referenced file is http://emeroteca.braidense.it/export/gea/367/00DD18981126_2700000300000058000001.djvu but unfortunately the name recorded in the index file is 00DD18981126_2700000300000058000001.djvu and Sumatra doesn’t know that it’s relative to http://emeroteca.braidense.it/export/gea/367/ (and even if it knew, we don’t have code to load data from websites, only from disk).

In other words this website is obsolete. Browser plugins are no longer supported and they should allow downloading the actual .djvu files with content.

GitHubRulesOK

Yes its 3 years later, so not much help for the original query. However, since testing a similar Issue I revisited this one and was able to open each page in turn by using a cmd wrapper.

It may be worth mentioning that using File Open and pasting or typing a valid website address will eventually result in the file showing within SumatraPDF but if you check the filename with CTRL+ D you will see the http request was handled by the Internet Explorer and then served as a local temporary cached file.

So here is the result of the third tab after pasting the first 3 sequential references and getting 3 files opened in separate tabs.

In this case my template.cmd would need to be improved to either add the sequential numbers or work with a for loop using an @ListFile of references. So For anyone with a similar requirement I am posting my Download And View script, which you can change to suit. As written it should work with any acceptable file type such as .PDF .DjVu .CbZ even Zip with images Etc.

@echo off

:: If SumatraPDF is not your default pdf handler you need to edit START section
:: Curl is included in current Windows 10, Most likely reason for the following
:: error:=  curl: (1) Protocol " https" not supported or disabled in libcurl
:: is that there was a space at the start of the line
::
echo  This file will download remote web file(s) and open them with SumatraPDF.exe
echo  for an example highlight this dummy entry rightclick twice to paste it below
echo:
echo "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
echo:
echo  You could also use SumatraPDF "File Open" command to do the same however the
echo  temporary cached entries may be flushed, here you can edit this file to save
echo:
echo  BEWARE only use with files you know have been virus checked or known as safe
echo  and this download could overwrite any similar named file in target directory.
echo:

:loop
:: Clear filenames from any previous looped run
set RemoteName=
echo: & set /p RemoteName="Paste web file name here (empty=exit) = "
if "%RemoteName%"=="" exit /b
FOR %%G IN (%RemoteName%) DO set LocalName="%DownDir%\%%~nxG"
echo: & echo Attempting to download %RemoteName% & IF exist %LocalName% del /F %LocalName%
echo: & curl -o %LocalName% "%RemoteName%"