Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Aspect Ratio #9

Closed
phelps-matthew opened this issue May 30, 2020 · 2 comments
Closed

Different Aspect Ratio #9

phelps-matthew opened this issue May 30, 2020 · 2 comments

Comments

@phelps-matthew
Copy link

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
@ashafaei
Copy link
Owner

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.

@phelps-matthew
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants