ndy2 / mkdocs-obsidian-support-plugin

A MkDocs plugin that supports obsidian to mkdocs convert
https://ndy2.github.io/mkdocs-obsidian-support-plugin/
MIT License
14 stars 4 forks source link

PDFs don't generate properly? #46

Open EvanMerk opened 1 month ago

EvanMerk commented 1 month ago

Hey I am wondering if you can help me out with trying to figure out why my PDF doesn't correctly generate. To get it to work properly I have to remove {base_path} from the code in pdf.py

EvanMerk commented 1 month ago

This is what I changed

def _convert_tags(self, base_path: str, pdf_path: str, tags: str) -> str:
        if tags is None:
            height = 800
        else:
            height = int(tags[8:])

        return cleandoc(f"""
        <object data="{pdf_path}" type="application/pdf" width="100%" height="{height}px">
            <embed src="{pdf_path}">
                <p>This browser does not support PDFs. Please download the PDF to view it: <a href="{pdf_path}">Download PDF</a>.</p>
            </embed>
        </object>
        """)
ndy2 commented 1 month ago

Hi. @EvanMerk Sorry for late the response.