[Binary & Base64 Data To PDF] How to resize or make is auto size as per application view screen?
Forge component by Rahul Sahu
Application Type

Hi All,

I have a requirement to show the pdf saved in binary data format. I came across this component and it does the same but the only issue is with respect to its view . Its now aligning to the screen view .

Is there any way to do it. Any help or suggestion will be great.




you can increase or decrease the scale from this script.

also you need to add some css for it on div where you are showing it.



Hi Rahul,

Thanks for the suggestion , As you mentioned , I was able to resize it by modifying the JavaScript. But I realized that Its displaying the image of the page and not the actual PDF content. Is there any way to show the original PDF and not the Image preview.

var canvas = document.getElementById(DivID);

var viewport = page.getViewport(canvas.width / page.getViewport(1.0).width);

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.