Unable to view pdfs, import/exports work fine

9 views
Skip to first unread message

Elisa Sartori

unread,
May 21, 2025, 10:11:17 AMMay 21
to inception-users
Hello Richard,
Thanks for your work, I've been using Inception for a while now and it has been an invaluable asset for annotations!

I'm working on a new project where I have to work with texts and images, and I planned to use PDFs for that, but I'm having problems with it.
I am able to import and exports the PDFs just fine, but when using the annotation editor I am unable to view any PDF and get the following message: (PDF.js v2.14.305 (build: eaaa8b4ad) Messaggio: Failed to fetch). I am able to view other types of data without problems (e.g., txt).

Other things that may be relevant:
  • we recently upgraded Inception to the latest version (36.3)
  • there are some errors in the reverse proxy status window
    • Reverse proxy does not seem to be trusted.
    • Server-generated URLs use a different protocol than the browser
I tried to fix the errors by making some changes to the settings file (see attachment), but it appears not to be working.
Do you have any suggestions on what else I could try?

Best,
Elisa
Additions_to_settings.PNG

Richard Eckart de Castilho

unread,
May 21, 2025, 1:45:44 PMMay 21
to incepti...@googlegroups.com
Hi Elisa,

could you please try importing a HTML and check if you can view that?
It should open in an HTML-oriented editor, not in the typical brat-like view.

Wrt PDF: could you open the developer tools of your browser while viewing
a PDF document (or rather the error). Switch to the "Network" tab, reload the page,
and check for any failed connections. There should be at least one which is likely
a failed attempt to load the PDF file. There, check which URL was used for the request
and in particular if the URL looks similar to the one you use in your browser to
access INCEpTION - in particular the protocol (http vs https) and possibly look out for
special characters in the URL.

-- Richard

Elisa Sartori

unread,
May 22, 2025, 7:36:40 AMMay 22
to inception-users
Hello Richard,
I imported the HTML, it opened in the HTML editor, and I was able to see the text but not the image. There were no errors in the "Network" tab, so it could be an error in creating the HTML.

As for the PDF, there is an error in the Network tab (see attachment). The URL goes from our custom https domain to http://localhost. Also, I found that if I switch to BRAT I can see the text of the PDF.

Best,
Elisa

Pdf_error.PNG

Richard Eckart de Castilho

unread,
May 25, 2025, 2:59:33 PMMay 25
to incepti...@googlegroups.com
Hi Elisa,

> On 22. May 2025, at 13:36, Elisa Sartori <elisa.s...@studenti.unipd.it> wrote:
>
> I imported the HTML, it opened in the HTML editor, and I was able to see the text but not the image. There were no errors in the "Network" tab, so it could be an error in creating the HTML.

INCEpTION can only load images for HTML files if you upload the data as a ZIP file that includes the HTML and the image files.
You have to enable the corresponding import format by adding "format.html-zip.enabled=true" to your "settings.properties" file.
(https://inception-project.github.io/releases/36.3/docs/user-guide.html#sect_formats_html-zip)

The security settings should already be setup by default to load images from these ZIPs.
(https://inception-project.github.io/releases/36.3/docs/admin-guide.html#sect_security_csp)

> As for the PDF, there is an error in the Network tab (see attachment). The URL goes from our custom https domain to http://localhost. Also, I found that if I switch to BRAT I can see the text of the PDF.

The PDF does not seem to load because you are using https to access INCEpTION, but INCEpTION thinks it is being accessed via http and generates an http address to load the PDF from.
Typically - as you noted - this is a problem with the reverse proxy setup.

Which reverse proxy are you using?

Maybe you can also check out this recent discussion if it contains any helpful information for you: https://github.com/inception-project/inception/issues/5351

Cheers,

-- Richard

Reply all
Reply to author
Forward
0 new messages