0

I'm looking to save my pageless Google Doc as a .PDF file. I have tried the workaround described HERE which essentially works by saving the Google Doc as HTML, then using a web service to convert to pageless PDF, however this method does not allow for images to be included.

I am open to all kinds of workarounds, as I am desperate to get this done correctly.

Also, this post is NOT a duplicate of THIS thread, as my question is distinct in that it needs to include images, not simply text as posted in the other question.

Thanks

6
  • 1
    Have you tried opening the Doc in your browser and using the html-pdf browser extension?
    – Blindspots
    Apr 21 at 1:06
  • @BlindSpots yes, thanks for asking. When I try that it says "Unable to Load" Try it yourself - docs.google.com/document/d/… Apr 22 at 4:37
  • 1
    You can first publish the Doc File > Share > Publish to web then the extension will work. You will need to make the images the same width as the text area or they will overlap, and may still not be happy with the output. This is an example of an XY problem.
    – Blindspots
    Apr 22 at 16:45
  • 1
    Thank you this seems to work, however I am not able to reconcile the image width difference. When I look at the images on my document before publishing they seem fine, so I am at a loss of how to resize them. Indeed it is an XY problem. Apr 23 at 18:23
  • 1
    I've got an idea I'll try when I'm home tonight.
    – Blindspots
    Apr 23 at 22:26

1 Answer 1

1

Below is a variation on the workaround you linked to with a fix for your missing images problem.

The issue is that Sejda's HTML-to-PDF tool can only understand the paths for images that are hosted on the web. My workaround (workaround for a workaround) is simply to temporarily host the images on the web.

For example, when you download your Doc as HTML you end up downloading a ZIP archive. When you extract the ZIP archive, you note that it contains one HTML file in addition to a folder labeled images containing your 6 images (5 png, 1 jpg):

  • images/image1.png
  • images/image2.jpg
  • images/image3.png
  • images/image4.png
  • images/image5.png
  • images/image6.png

These images are linked in the HTML document in image tags similar to <img src="images/image5.png">

Instructions

  1. Temporarily upload each of the images in turn, and note their new web URLs.
  2. Open the HTML file in a text editor, and perform a "Replace All" using the local image path as the FIND string, and the web URL as the REPLACE string.
  3. Once that has been completed for each of the 6 images, save the HTML document.
  4. Open the HTML document in a web browser and use Sejda's HTML-to-PDF extension or alternatively upload the file to Sejda's HTML-to-PDF converter, or even copy and paste the HTML code.
Find All (local image path) Replacement (Image URL)                                                                                                                                     
images/image1.png https://i.stack.imgur.com/LGvvJ.png
images/image2.jpg https://i.stack.imgur.com/DHYEZ.jpg
images/image3.png https://i.stack.imgur.com/JDubj.png
images/image4.png https://i.stack.imgur.com/1SPCz.png
images/image5.png https://i.stack.imgur.com/dkz6g.png
images/image6.png https://i.stack.imgur.com/76lMJ.png
1
  • 1
    I will accept this as answered (thank you), but there is no way I am going to do this each time one of my dozens of tutorials is updated, as they are updated often. I was hoping for an easy way to do this. Thanks for the workaround. May 4 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.