I want to have a shape with text where the text fits neatly inside the shape. To do this I need to know how tall the text in a textElement will be inside a given shape, is there a way to do this?
With the Google Slides API is there a ways to know the height of the text in a shape?
411 Views Asked by Richard At
1
There are 1 best solutions below
Related Questions in GOOGLE-SLIDES-API
- Google slide, Invalid requests[0].replaceAllShapesWithImage: The operation is not allowed on notes page element g19e33b833f_2_9
- 403 error with message "Google Slides API has not been used in project ... before or it is disabled"
- Error thrown during batchUpdate for createImageRequest
- Image from Google Drive to Google Slides via DriveApp.getFileById
- Google Slides: modifying the thumbnail view
- Google Slides API replace the image but not remained its photograph and size
- Is there no Google Player API for Google Slides?
- Python Google Slides API - Adjust table width and height to fit inside the page
- Google Script `SlidesApp.openById` or `SlidesApp.openByUrl` returning empty object `{}`
- Google Slides API- How to change text color for all shapes of a certain color
- With the Google Slides API is there a ways to know the height of the text in a shape?
- Google Slides API: Intermittent "There was a problem retrieving the image." error from CreateImage request
- Non-Editable Timestamps in Google Slides based on creation of a new slide in a presentation
- Google Cloud API (sheet, slides) Quotas with Service Account
- Images saved through slides API aren't editable in presentation?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Answer:
You can get the information of the font size of text inside a Shape using
presentations.getwith a field mask.More Information:
The structure of a Shape with text is as follows (irrelevant fields omitted):
You can get this with the field mask:
Example Request:
Note: The API does not return if the text wraps across multiple lines or not. This isn't retrievable due to the nature of font sizes. If the font you were using is a monospace font, it may however be possible to work this out based on the width of the Shape and the width of the characters contained within it.
References: