Not Solved [How To?] How To Post PDF or Word Doc File?
#1
Not Solved
What I want to do is post a full PDF or Word Doc file into the post.

Yea, I know all about the attachment thing, but that is not what I want. 

I want something to look like this, but it's NOT an image (shown below), but the actual PDF or Doc file.

I already have the PDF file of this image you see below. 

Is there a way to do this?

[Image: vdXZfJ0.png]
I'm Serpius and You're Not    ¯\_(ツ)_/¯
Reply
#2
Not Solved
You'd need to use a custom MyCode to embed a PDF, but you can't embed Word documents on the web, browsers don't know how to render those.

For a PDF, add a MyCode with these values.

Regular Expression:

\[pdf\](.*?)\[/pdf\]

Replacement:

<object type="application/pdf" data="$1" width="800" height="600"><param name="src" value="$1" /><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>

You can change the widths.

That will allow you to embed a PDF by URL, to have it so uploaded PDFs display like this would need a plugin, but doing it for Word docs isn't possible at all.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
Not Solved
(2022-03-12, 01:18 PM)Matt Wrote: You'd need to use a custom MyCode to embed a PDF, but you can't embed Word documents on the web, browsers don't know how to render those.

For a PDF, add a MyCode with these values.

Regular Expression:

\[pdf\](.*?)\[/pdf\]

Replacement:

<object type="application/pdf" data="$1" width="800" height="600"><param name="src" value="$1" /><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>

You can change the widths.

That will allow you to embed a PDF by URL, to have it so uploaded PDFs display like this would need a plugin, but doing it for Word docs isn't possible at all.

Ok, I understand about the Word Doc. I can use PDF.

I put your code into MyCode in my ACP. 

But, how do I add this function in the Editor Menu?

[Image: vpQgkwe.png?1]

I am not familiar with MyCode and how it works in the Editor Menu. 

Thanks
I'm Serpius and You're Not    ¯\_(ツ)_/¯
Reply
#4
Not Solved
Check that information, maybe can help you that info: 

- Super simple instructions to add your click-to-add-your-MyCode buttons

- Adding a button in SCEditor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)