One way of achieving desired result is to use Finder's Recent window:
⇧-⌘-F: open the Recents window, showing all of the files you viewed or changed recently.
open recent file from Recents window
make changes, save, close file (⌘-W)
⌘-Tab to make Finder's Recents window active
file you opened earlier is selected, press ⌘-O to open it again
My question is if there is a keyboard shortcut to open a recently closed preview file?
The following was tested in macOS Catalina 10.15.6 and worked for me while Preview has focus. (No third-party applications needed.)
If you just want to open the most recently closed document in Preview, then the following example AppleScript code used in a Run AppleScript ...
There isn't a built-in menu command "Open the last document" (or similar), so there's nothing you can apply a key command to.
You may be able to create an AppleScript that simulates clicking 'the first item' in the "Open Recent" submenu, whatever that may be. You'd then need to trigger that script as a Service with a key command in System ...
You CAN do it. At least this is what worked for me on MacOS Catalina and Preview Version 11.
Copy onto the Clipboard, the image that you want to paste on your PDF page.
Go to Preview -> File -> New from Clipboard.
This will basically create a new Preview document with your image in it. Now click anywhere on the image, press Cmd+A to select the entire ...
There's an open source tool called PDFbox (from Apache) that has some command line tools that you can use to extract the text so that it can be counted with wc. The command (because it's a Java jar) would be as follows:
% java -jar pdfbox.jar ExtractText -console foobar.pdf | wc -w
-console is required because it will automatically write a text file ...
To draw a line in preview go to the Tools menu and select Annotate. Under the Annotate option is an option for a line. This will put a single line on your page.
You might have hit rectangle instead on line. I can't guess very well what you did wrong.