news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

Calculate image height & width by converting pt to px #389

Closed jacqui closed 2 years ago

jacqui commented 2 years ago

Closes #388

Test using the case setup for the test document at version 112.

I tried to find a way to calculate the actual image dimensions, but shy of creating a standalone service to do this (example), I couldn't find a way to derive the height and width. This PR converts the dimensions from pt to px using the calculation in the linked SO answer.

TylerFisher commented 2 years ago

Used the test case already set up and got:

An error occurred: ScriptError: TypeError: s3Url.match is not a function