Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewer.less @pdfjsImagePath #15

Open
Paulsky opened this issue Mar 24, 2017 · 6 comments
Open

viewer.less @pdfjsImagePath #15

Paulsky opened this issue Mar 24, 2017 · 6 comments

Comments

@Paulsky
Copy link

Paulsky commented Mar 24, 2017

Hello,

In my project I would like to set a custom pdfjsImagePath. This is my current code:
globalVars: {pdfjsImagePath: '/resources/pdfjs/images'}

I think this should work. However, I get an error when compiling the viewer.less file to CSS. The error is
expected ')' got '/'. I think this is because the URL function doesn't include quotes. If I surround the string by quotes, the compiling succeeds. Like this:

border-image: url(@pdfjsImagePath/shadow.png) 9 9 repeat;
to
border-image: url('@pdfjsImagePath/shadow.png') 9 9 repeat;

Should this be the fix? Or should I set the pdfJsImagePath variable on a different way?

@jasny
Copy link
Member

jasny commented Apr 28, 2017

@Paulsky Thanks for the bug report. A PR would be fantastic.

@Paulsky
Copy link
Author

Paulsky commented May 19, 2017

@jasny I created a PR. Could you please review it?

@CasperWSchmidt
Copy link

I can confirm that this PR does fix the problem.

BUT: There's a single reference to loading-icon.gif in the less file that has a hardcoded value "images/loading-icon.gif" instead of @pdfjsImagePath. This should be fixed as well :)

@Paulsky
Copy link
Author

Paulsky commented Jun 26, 2018

Thank you for your reply @CasperWSchmidt . Could you give me the line number please? I searched for '.gif', but I can't see any hardcoded value in the .less file.

@CasperWSchmidt
Copy link

@Paulsky the less file is a mess, but try looking for loading-icon:
image
(screenshot is from viewer.css in your commit)

@CasperWSchmidt
Copy link

CasperWSchmidt commented Jun 26, 2018

Oh nvm @Paulsky. I think you did fix it in your PR, but I simply did the same replacement in my local file and overlooked this change :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants