Issue
I found questions about deleting all images, but can't find anything specific to what I need.
Background:
I'm making answer keys for a math course book. I have a Word document of the book, but don't want to update the answer key each time I update the course book (change order of questions / formatting / ...). I want to write all the answers in the course book directly, and then save as PDF both WITH and WITHOUT the answers.
For text I can do this (create new style --> write all answers with this style selected --> modify style colour to white if I don't want to print the answers). However, some questions have to be solved by drawing. I either can make these drawings again in Word, or I would insert an image (scan of the drawing on paper).
My question:
Mark the images that need to toggle show/don't show
So, I need a way to mark certain images with some kind of tag. I thought maybe the Alt-Text could be useful, but I can't find a way to get the Alt-Text of images in a PDF with Python. But if there is any other kind of marker/tag that I can place on the images that can be read, that's fine too.
Print the document either with or without the images with that marker
Then, I want to have 2 PDF documents: one without those specific images (student version), and one with those images (answer key). I don't mind if it is done in Word directly on the .docx file, or after the fact on the PDF file (preferably with Python)
Solution
I have found a solution to my specific problem, but have to preface it by saying it is not about the Alt-Text of the PDF file.
Thanks to a Reddit post suggesting to ask ChatGPT, because the AI actually did give me an idea about using Text Boxes in Word, which I then adapted in the following way:
Setup
- Create a Style, I'll call it "AnswerTextBox"
- Create a Text Box where you want to have a toggleable image (can be both in line or free to move)
- Set the Text Box fill and border to "no colour"
- Paste the image inside the Text Box
- Apply the "AnswerTextBox" Style to the Text Box
To toggle the images
- Be anywhere in the document
- Right click the "AnswerTextBox" Style
- Modify
- Select "Format" and "Paragraph"
- Set the "Line Spacing" option to "Exactly"
- Type the lowest possible value (0.7 pt for me)
- Select OK
- The images disappear!
- (To show the images again you just set the "Line Spacing" option back to "Single")
Answered By - MikeA
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.