Ngx-extended-pdf-viewer: Adding deployUrl before pdfDefaultOptions.assetsFolder

Created on 12 Oct 2020  路  6Comments  路  Source: stephanrauh/ngx-extended-pdf-viewer

Hi,
I have multiple environment and every environment have different deployUrl, because of that, I got this error.
image

My configuration as follow:
image

Is there any way I can add deployUrl pdfDefaultOptions.assetsFolder?

Thanks.

user support waiting for the user's answer

Most helpful comment

Thanks @stephanrauh, it solved.

image

After overriding,

image

All 6 comments

This attribute is new to me. But I suppose you also have to configure the baseHref:

<!DOCTYPE html>
<html lang="en">
  <head>
    ...
    <base href="/path/" />

I can only guess (because it's also new to me), but I suppose you can also configure this in the baseHref key of your angular.json, just below the deployUrl.

Does this answer the question? I so, give me a short "ping" so I know I can close the issue.

Thanks in advance,
Stephan

For my case, I can't configure both to same value.. Currently, all my assets will under https://10.1.64.21/fssm/public/assets/. Later, in production, we will store all our assets at ./fssm/public/prod/assets/

I see. Well, you can also override the default options:

pdfDefaultOptions.assetsFolder

Thanks @stephanrauh, it solved.

image

After overriding,

image

That's great news! Why I wrote my answer, I was in a hurry, so I didn't find the time to mention the feature is even documented: https://pdfviewer.net/troubleshooting (second paragraph).

BTW, it seems you didn't activate the map files. Debugging ngx-extended-pdf-viewer is more fun when you see the real source code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dheerajm91 picture dheerajm91  路  3Comments

vfabregat picture vfabregat  路  5Comments

rscherer picture rscherer  路  7Comments

ekselys picture ekselys  路  5Comments

StevenGarcia-CG picture StevenGarcia-CG  路  10Comments