question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seeing spinner/loading icon until cursor is moved and then PDF displays

See original GitHub issue

Hi

I am seeing the spinner/loading icon forever and pdf is not loading in the viewer until i move my mouse or open inspect element in chrome.

Problem statement: I see spinner forever and PDF is not displayed if i do not move my mouse.

Screen shot: image

I managed to find the error in console: image

The problem is if it happens every time, i will undestand that some thing is wrong with the classes. But it happens twice in every 5 time i open the modal.

Please help me to resolve this. Will you be able to set the default offsetparent so that it will never break ? Or else how do i handle the offsetParent ? because it works sometimes and not in sometimes? Is there a way to set the offset parent ? Please see if you can add the minimum offsetParent so that there wont be a spinner ?

Using the below code:

<div bsModal #pdfModal="bs-modal" class="modal" tabindex="-1" [config]="{ignoreBackdropClick: true, backdrop: 'static', keyboard: false}"
     role="dialog">
  <div class="modal-dialog modal-large">
    <div class="modal-content">
      <div class="modal-header">
        <div class="modal-title">View PDF in modal: src {{selectedSource}} <br>
        {{stringSource}}</div>
      </div>
      <div class="modal-body" *ngIf="!selectedSource && stringSource">
     <ngx-extended-pdf-viewer [src]="stringSource" height="100vh" zoom="115%" [useBrowserLocale]="true"
[showBorders]="false" backgroundColor="white" [showSidebarButton]="false" [showFindButton]="false"
[showPagingButtons]="false" [showZoomButtons]="true" [showPresentationModeButton]="false"
[showOpenFileButton]="false" [showPrintButton]="true" [showDownloadButton]="true"
[filenameForDownload]="false" [showBookmarkButton]="false" [showSecondaryToolbarButton]="true"
[showRotateButton]="true" [showHandToolButton]="false" [showScrollingButton]="false" [showSpreadButton]="false"
[showPropertiesButton]="false">
</ngx-extended-pdf-viewer>
      </div>
      <div class="modal-footer">
        <button class="btn btn-primary" (click)="pdfModal.hide()">Close</button>
        <button class="btn btn-primary" (click)="onPrint()">Print</button>
    </div>
    </div>
  </div>
</div>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
stephanrauhcommented, Oct 5, 2020

@dheerajm91 We seem to live in different time zones. I’l try your reproducer this evening, but first I have to go to work. 😃

You’re right, the modal window sounds like a hot trace. The original PDF viewer has only written to be used as the PDF viewer of Firefox. Making it work in an application wasn’t easy, and making it work in a modal window seems to be even more challenging.

0reactions
stephanrauhcommented, Oct 6, 2020

That’s a good idea! I’ll add it to the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mouse pointer changes into a black box when moved over ...
If your mouse cursor changes into a black box when moved over blank areas in a PDF document, use the solution below as...
Read more >
INSTRUCTIONS ON THE ANNOTATION OF PDF FILES
When you open the PDF file using Adobe Reader, the. Commenting tool bar should be displayed automatically; if not, click on 'Tools', select...
Read more >
cursor - CSS: Cascading Style Sheets - MDN Web Docs
The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element.
Read more >
How to create a signature for PDF documents on a PC
Use your cursor (or, if you've got a touch screen, your finger) to sign the PDF, and then save the document. You ...
Read more >
Floating Text on PDF Documents - KHKonsulting LLC
Tutorial that shows to to add floating text to a PDF document that can be shown and hidden based on the mouse cursor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found