简体   繁体   中英

HTML, resized embed pdf

I have embedded a pdf using this javascript function:

screenshotPreview = function(filename){    

    $("#body").append("<p><embed src=" + filename + " type='application/pdf' width='60%' height='60%' class='pdf_image'></p>");                           

};

However, the width and height adjustment doesn't resize the pdf, it just trims the pdf window size, so the user still needs to scroll within this window to see the whole pdf.

Any suggestions? I've tried using scale='tofit' as well, but see no change.

您需要缩放容器而不是嵌入容器。

缩放包含div而不是嵌入的div。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM