Different Aspect Ratio
phelps-matthew opened this issue · 2 comments
Thanks for this great tool :)
I was wondering about other options for resizing. My pdf is in 16:10 aspect ratio, and using powerpoint I can convert the slides to this dimension but there is a loss in quality.
Would you be able to explain what this code snippet does?
if [ "$makeWide" = true ]; then
pat='<p:sldSz cx=\"9144000\" cy=\"6858000\" type=\"screen4x3\"\/>'
wscreen='<p:sldSz cy=\"6858000\" cx=\"12192000\"\/>'
call_sed "s/${pat}/${wscreen}/g" ../presentation.xml
fi
popd
Thanks for the nice comment!
The default aspect ratio is 4:3. If the $makeWide
flag is active, it would change the resolution of the final PowerPoint project to 16:9
.
The code above searches for pat
, the pattern for 4:3
screen, and replaces it with wscreen
, the pattern for 16:9
screen, in the PowerPoint configuration file ../presentation.xml
. About the numbers in the pattern, I'm not sure how exactly they correspond to the slide size, other than they have the same relative aspect ratio as the 4:3
or 16:9
.
If you want to make it 16:10
, I'd recommend trying this instead:
if [ "$makeWide" = true ]; then
pat='<p:sldSz cx=\"9144000\" cy=\"6858000\" type=\"screen4x3\"\/>'
wscreen='<p:sldSz cy=\"7620000\" cx=\"12192000\"\/>'
call_sed "s/${pat}/${wscreen}/g" ../presentation.xml
fi
Please let me know if it works.
Yes, this worked great. As you had mentioned, I realized the ratio of cx/cy gave the right aspect but wasn't sure what to use as their absolute magnitude. The values you gave here seemed to work well. Thanks!