View JSReport generated large PDF files through Chrome v67



  • Hi,
    I am having trouble viewing the large PDF file in Chrome browser. If size is 2819 KB in size, chrome opens it properly but when size is more than 10000 KB, it might open or show the error message.
    If in my angular component, I hard-code the file name which is 59,000KB in size, it opens up in chrome but if I sanitize the returned filename and not hard-code then it shows unable to load PDF.

    this.pdfPrjDetailsUrl = this.sanitizer.bypassSecurityTrustResourceUrl('/tmp/quarterlyDetails-1529698031132.pdf');  //is good
    this.pdfPrjDetailsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data['_body']); //is bad for large files
    

    I added PDF viewer extension in Chrome as it says for file sizes bigger than 2MB.
    Have you encountered this kind of problem,
    Rashmi


  • administrators

    hi! never saw this before in angular users. hmm i'm not sure what can be the issue (i don't have too much angular knowledge), i guess there must be something related to angular internals. is there some way to see a live minimal version of your problem? maybe in some online editor like Codesandbox



  • Solved it. I forget that things move asynchronously and my pdf file was creating or finishing later than I was opening it :-(.
    Thanks for the help.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.