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

DPI Override in ElementProperties > PptxUnitHelper #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bekworks
Copy link

Simple override of default 72 DPI used in PptxUnitHelper.

Solves
Adding images into our PowerPoint template results in dimension overrides, in the form of scaling.
Our template is set at 96 DPI, resulting in a scaling of 133% of all inserted images, using the default DPI of 72.
This allows us to specifically set the targeted DPI when adding images, thus eliminating the scaling altogether.

Notes
This may be required for some other elements as well, shapes and textboxes, but I've left those alone, as we're not using them.
This was the easiest way to achieve our needs of not having to switch to a different library.

In a perfect world, the DPI settings should be read from the document, and automatically be used in calculations. But I do not have the required experience with PowerPoint, to actually achieve this.

@heavysixer
Copy link
Owner

@gregdolley this looks good to me, but see that this example is limited. what do you think it would take to make this more global?

@heavysixer
Copy link
Owner

@bekworks Can you please add some unit tests for this to ensure we have good coverage and that future commits don't inadvertently break your code?

@heavysixer
Copy link
Owner

@bekworks additionally what is the workflow you added? I see that your branch requires approval to run a workflow but am curious what that is and why its needed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants