I have a database containing the URLs to several thousand published Google Doc URLs.
These URLs look like this and are rendered as an HTML page:https://docs.google.com/document/d/e/<long-unique-id>/pub
The formatting of these published docs gets messed up when trying to print the HTML page, so I need them to be PDFs -- either in a new tab or downloadable to the file system.
I've tried this PDF URL structure: https://docs.google.com/viewer?url=https://docs.google.com/document/d/<another-long-unique-id>/export?format=pdf
...But the ID from the pub version doesn't work with the export version. It would appear that they expect different IDs.
Is there any way to get my existing "/pub" URLs to work as exportable URLs? Or is there a way to reverse engineer pub URLs back to the regular, shareable URLs?