Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey Guys, I have few pages from books in SWF format (without swf source). I would like to put these swf pages to one html page in a scrollable format. I would like to scale these SWF pages to the width of the holder div and I want to keep their original aspect ratio. I tried to use the scale attrib but as I see that doesn't fit for this purpose.
Click here for the full sample or you can see here a shorter sample:
HTML
<div id="holder" style="removed 100px; removed 50px; removed: absolute;border:10px solid red;">
<embed width="100%" height="100%" src="page1.swf" scale="default" style="border:10px solid blue;">
<embed width="100%" height="100%" src="page2.swf" scale="exactfit" style="border:10px solid grey;">
<embed width="100%" height="100%" src="page3.swf" scale="noborder" style="border:10px solid blue;">
<embed width="100%" height="100%" src="page4.swf" scale="showall" style="border:10px solid grey;">
<embed width="100%" height="100%" src="page5.swf" scale="noscale" style="border:10px solid blue;">
</div>

The goal is: creating scrollable pages like in Adobe Reader if "View\Page Display\Enable Scrolling" and "View\Zoom\Fit Width" options are set. Scrolling is solved but how can I scale the SWF objects to the holder div width? As you see in the sample url either there are two big empty areas on the left and right side of the pages or the pages distorted or cut what we would like to avoid.
Could you help me please? Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 14-May-15 19:41pm    
SWF, being widely used, is not a standard format. If the files are from books, they should be just images. (Is that right.) Listen to a good friendly advice: convert them to PNG or JPG.
And the problem of aspect ratio just does not exist. Say, don't specify width or height, or specify only one of them.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900