VadimDez / ng2-pdf-viewer

📄 PDF Viewer Component for Angular
https://vadimdez.github.io/ng2-pdf-viewer/
MIT License
1.3k stars 420 forks source link

pdf source url is not working #1054

Open Anand0624 opened 11 months ago

Anand0624 commented 11 months ago
Pdf source url is not working
- Src Url : https://ffnxt-private-dev.s3.ap-south-1.amazonaws.com/Companies/15/Clients/11794/Temp_Invoices/11794_INV_29_2023_131_962ed6f5-acf7-4e1b-a08b-07226b9946c4.pdf?X-Amz-Expires=3600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIASZ2CBGWA3VTHCF5P%2F20231226%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20231226T070255Z&X-Amz-SignedHeaders=host&X-Amz-Signature=d76f4a496b22c0e55d5c3a4083d832a8274bb88e523c18b26b57361ba2771f3d
-  in pdf src url tag it is breaking down
- <pdf-viewer style="width: 100%;" _nghost-fpi-c350="" ng-reflect-src="https://ffnxt-private-dev.s3.a" ng-reflect-render-text="true" ng-reflect-original-size="true" class="ng-star-inserted"><div _ngcontent-fpi-c350="" class="ng2-pdf-viewer-container"><div _ngcontent-fpi-c350="" class="pdfViewer removePageBorders"><div class="page" data-page-number="1" role="region" style="width: 793px; height: 1122px;"><div class="loadingIcon notVisible" role="img"></div></div></div></div></pdf-viewer>
![pdfissue](https://github.com/VadimDez/ng2-pdf-viewer/assets/66820436/16f63db4-92c8-461a-92d8-664c7464b05e)
Anand0624 commented 11 months ago

pdfissue

4dd4m commented 2 months ago

I also encountered this issue. My solution was the example code.

It seems like the component is sensitive to some parameters. Meaning, if you call it with the exact way like on stackblitz, the src is picked up no problem:

image

If you omit the style="width: 900px; height: 1300px;" the src will get truncated immediately.