News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Is there a way to configure SMF to view PDF in browser?

Started by Kathryn_, January 29, 2018, 08:31:44 PM

Previous topic - Next topic

Kathryn_

I have an ebook site and provide pdf, epub mobi links and what I thought would work with a read online that is a pdf.. Problem is SMF forces downloads wherever I place the link ... Is there a configuration or Mod I can use to present this needed feature?

Site

Working site is a mybb one that I am hand copying over to SMF 2.0.15. here the read online works perfect and the downloads are just that ...

Current site

SaltedWeb

If you check the top menu here that says customize and do a search there were couple mods there
that sounded like what you are looking for.
I have not used any of those mods.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

aegersz

i would also like to know. i did have some luck at some point with a pdf mod mentioned but it stopped working for me (may be due to Flash support being withdrawn in Chrome). will try IE later and get back to you.

read https://www.simplemachines.org/community/index.php?topic=35851.100

... and see mod > http://custom.simplemachines.org/mods/index.php?mod=1468
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Sir Osis of Liver

If you post the link in a message, clicking on it opens file in pdf reader.  If you attach it, clicking on attachment link displays option to download or open in FF57, not on this board in IE11.

http://www.thekrashsite.com/pics/Lasko5538.pdf
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kathryn_

Thank you all I appreciate your help and I think the problem is I am uploading it through attachment... I have to figure this out, its necessary.  ;)

Sir Osis of Liver

Don't know why IE doesn't see option to open pdf when attachment is clicked, it works in 2.0.15 test install, and here in FF57.  Must be something on this forum blocking it.  There's a mod that adds pdf bbc tag that opens pdf directly in post, needs some tinkering but it works.  Don't know if that's any help to you.

https://custom.simplemachines.org/mods/index.php?mod=1468
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

lurkalot

Quote from: Sir Osis of Liver on January 30, 2018, 03:59:43 PM
Don't know why IE doesn't see option to open pdf when attachment is clicked, it works in 2.0.15 test install, and here in FF57.  Must be something on this forum blocking it.  There's a mod that adds pdf bbc tag that opens pdf directly in post, needs some tinkering but it works.  Don't know if that's any help to you.

https://custom.simplemachines.org/mods/index.php?mod=1468

I can open or save it in IE11 on here,

Kathryn_

Hi  What I did was made a folder on the sever and then uploaded the PDF I wanted to use as a read online and then it worked using the link from the folder for each...
try it  click the blue button that says read me... post

Thank you all for suggestions that pointed them in the right direction,.. :)

Sir Osis of Liver

Nice forum, good selection of books, will see if it works on my Kindle Fire.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb

Quote from: Kathryn_ on January 31, 2018, 04:42:39 PM
Hi  What I did was made a folder on the sever and then uploaded the PDF I wanted to use as a read online and then it worked using the link from the folder for each...
try it  click the blue button that says read me... post

Thank you all for suggestions that pointed them in the right direction,.. :)

Really impressed nice collection and site what mod did you use for the child boards ?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb

Oh ok I think I used that before thanks Osis. I like how they made use of that on the site very nice.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Kathryn_

thank you for the nice compliments on the site... I was hoping it is simple and showcases the books...I have been working daily to get it copied over but thanks to the advice I have found on here and what was suggested I am having fun now and its going faster

Thank you for making it happen for me.....

legaziofunk

Quote from: Kathryn_ on January 31, 2018, 04:42:39 PM
Hi  What I did was made a folder on the sever and then uploaded the PDF I wanted to use as a read online and then it worked using the link from the folder for each...
try it  click the blue button that says read me... post

Thank you all for suggestions that pointed them in the right direction,.. :)

Hi people,

thanx for the explanation of the distinction between LINK IN POST on the one hand and ATTACHMENT on the other.

The "solution" of creating a folder on the server which holds the PDF itself and will be directed to via a LINK IN POST is only suitable for admins.

But how can a user attach a file - and another user see that PDF file in the browser?

When using (all on Mac)

  • FF 6x: asked if download
  • Opera 54: downloads it right away, but have to open it manually
  • Safari 11.1.2: downloads it right away and opens it automatically

Again: this counts for the attachments.

It is quit annoying in a forum, where users are uploading lots of important files but they have to be saved all on your computer manually or at least be opened all the time in e.g. Acrobat. Esp. "quick checks" are a lot of work to do that...

Thanx for any solutions!
*I am a NEWBIE* Stats as of Dec. 2019
SMF: 2.0.15
Language: GERMAN UTF-8 by default for every user
Theme: CoreTheme
PHP: 7.2
MySQL Version: 5.6.45-86.1-log

Arantor

If you're putting them in as attachments, the code forces the download in every case. This is by design and can't be easily altered in a way that would work only for PDFs.

Kindred

well, that depends on your browser setting, I think...  because, I, invariably, get PDFs opened when I click on them (in SMF or anywhere else)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

The link to a PDF expressly emits a Content Disposition header with value attachment, which should be interpreted as a download by every major browser in line with HTTP/1.1.

Kindred

I appear to have set something (years ago) which forced my browser to always open a PDF.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Maybe, but it's not something you can set on the server side which was the question.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: