PDF Test
This post only records the recommended way to insert PDFs on posts.
Two ways to insert PDF have been found.
Most importantly, just make sure:
- Documents chosen should be put in the post folder whose name must be the same as the post;
- The path of post folder must be the same as the path of post;
- The post folder and the post must be put in the same folder
_post.
Issues remained unresolved:
- If documents are local, explorers will directly download them instead of previewing them;
- URL can be previewed but NOT local paths;
- HTML languages like iframe is better than PDF.js because they can show the column in the preview window.
2 Examples displayed as below.
No.1
1 | {% pdf https://downloadcenter.samsung.com/content/UM/202111/20211116144456470/SM-G99X_UM_EU_SS_Eng_Rev.1.0_211103.pdf %} |
No.2
1 | <iframe src="./samsung-s21-ultra-user-manual.pdf" width="100%" height="800px"></iframe> |
Unfortunately, it is found that only the second one (iframe) can be displayed successfully on Android and iOS.