-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
New release causing blank pdf #35
Comments
@ShayShaked, Could you provide more information? |
Of course. I'm developing mobile app with Ionic 2 + Angular 2 using visual studio and ripple emulator on chrome. I installed the plugin about two weeks ago and it worked perfectly well. Until yesterday i had version 0.1.0 . Yesterday my team ran install for ng2-pdf-viewer for the first time on their machines and ran some troubles seeing the pdf, showed as blank sheet. I decide to remove my version on my machine and install the new one. same problem occurred. On chrome dev tools i saw svg's tags that assembles the pdf. Decided to rollback to version 0.1.0 and it worked well. To investigate more i Installed versions 0.1.1 - 0.1.2, and it worked (pdf showed without any problem). |
Just tried clean ionic2 project with pdf viewer - can see the pdf. |
I see this (or similar) problem too after updating to 0.1.3. (with 0.1.2, don't see the problem with 0.1.3.) Error I see on console is this, TypeError: Cannot read property 'parentNode' of undefined from this code But, more detail of my problem is that
I am using angular-cli (beta 21) with bootstrap4 alpha5 and don't use ionic for my project FYI. @VadimDez, please let me know if you need more info. |
After updating to 0.1.4, the type error above has gone. But all pages are not displayed - all blank pages. I believe this commit fixed - "when page goes to 2nd page, the above error on console but the page is displayed correctly." But does not fix - only 1st page is not displayed (blank page without any error on console.) to begin with. I got to set [render-text]="false" to pdf-viewer to display all pages and verified with 0.1.3 same workaround works - 1st page is displayed when [render-text]="false" is set. ([render-text]="false" is set, I see canvas only.) ([render-text]="true" is set, I see both svg text layer and canvas.) So, I think real problem here is "textLayer" class on the svg element. For my project with angular-cli, I needed to include pdf_viewer.css either into index.html or angular-cli.json's styles array if I want see pages at least (I mean not a permanent fix) with [render-text]="true" . |
Thank u very much for this useful plugin!!
Version 0.1.3 causing blank pdf to show.
version 0.1.2 works well.
The text was updated successfully, but these errors were encountered: