2023-01-19, 01:38 PM
(This post was last modified: 2023-01-19, 01:38 PM by Taylor M. Edited 1 time in total.)
There's some older versions of this rolling around but don't seem to be working anymore. expertful requested assistance in [How To?] Embedd pdf documents to view in threads but I figured I would go ahead and repost here for those searching the MyCode forum for this specific ability.
MyCode Installment
Regular Expression:
Replacement:
> Self Hosted PDF's
If the PDF is hosted on the internet somewhere they will simply use the link inside the [pdf] MyCode.
> Google Drive PDF's
GDrive has specific permissions and requirements that must be followed to link a PDF hosted there.
Step 1:
Need to set the PDF document on google drive to be sharable by link (anyone with link can view < this is important or others won't be able to see it).
--> https://support.google.com/docs/answer/2...%3DDesktop
Step 2:
Right click the document and click Preview > More actions (the three vertical dots) > Open in a new window.
Step 3:
On the new open window click More Actions (the three vertical dots) > Embed item.
Step 4:
The URL link in the iframe code it gives is what you will post in [pdf]link[/pdf].
MyCode Installment
Regular Expression:
\[pdf\](.*?)\[/pdf\]
Replacement:
<iframe src="$1" width="100%" height="700px"></iframe>
^ change height/width to whatever you want> Self Hosted PDF's
If the PDF is hosted on the internet somewhere they will simply use the link inside the [pdf] MyCode.
[pdf]https://www.africau.edu/images/default/sample.pdf[/pdf]
> Google Drive PDF's
GDrive has specific permissions and requirements that must be followed to link a PDF hosted there.
Step 1:
Need to set the PDF document on google drive to be sharable by link (anyone with link can view < this is important or others won't be able to see it).
--> https://support.google.com/docs/answer/2...%3DDesktop
Step 2:
Right click the document and click Preview > More actions (the three vertical dots) > Open in a new window.
Step 3:
On the new open window click More Actions (the three vertical dots) > Embed item.
Step 4:
The URL link in the iframe code it gives is what you will post in [pdf]link[/pdf].
[pdf]https://drive.google.com/file/d/1kHkH6HQ9i7EP3NAaAUns8x6wgsBIDzCr/preview[/pdf]