Skip to content

Instantly share code, notes, and snippets.

@R0mb0
Created April 11, 2025 14:20
Show Gist options
  • Save R0mb0/3aeeccfb141bdb85737eb820c03c36a6 to your computer and use it in GitHub Desktop.
Save R0mb0/3aeeccfb141bdb85737eb820c03c36a6 to your computer and use it in GitHub Desktop.
My way to "embed" pdfs inside a GitHub Markdown Readme documents, is not perfect but is better than nothing.

My way to "embed" pdfs inside a GitHub Markdown Readme documents

  1. Convert the pdf document in image
    • Install the software
      sudo apt update
      sudo apt install poppler-utils
    • Convert the pdf
      pdftoppm -png input.pdf output_prefix
      • Replace input.pdf with the path to your PDF file.
      • Replace output_prefix with a prefix for the output PNG files. For example, if you use page, the output files will be named page-1.png, page-2.png, etc.
  2. Upload images somewhere
  3. Prepare Markdown code For example:
    ![1.png](some/link/to/1.png)
    ![2.png](some/link/to/2.png)
    ![3.png](some/link/to/3.png)
    ![4.png](some/link/to/4.png)
    ![5.png](some/link/to/5.png)
    ![6.png](some/link/to/6.png)
    ![7.png](some/link/to/7.png)
    ![8.png](some/link/to/8.png)
    ![9.png](some/link/to/9.png)
    ![10.png](some/link/to/10.png)
  4. Create a collapsible part in the readme document For example:
    <details>
      <summary> 
    
      ## ๐Ÿ‘‰ Click here to view the document ๐Ÿ‘ˆ
    
      </summary>
      
    ![1.png](some/link/to/1.png)
    ![2.png](some/link/to/2.png)
    ![3.png](some/link/to/3.png)
    ![4.png](some/link/to/4.png)
    ![5.png](some/link/to/5.png)
    ![6.png](some/link/to/6.png)
    ![7.png](some/link/to/7.png)
    ![8.png](some/link/to/8.png)
    ![9.png](some/link/to/9.png)
    ![10.png](some/link/to/10.png)
      
     </details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment