1 (edited by PunBB 2017.09.20 09:19)

Topic: Просмотр PDF документов в сообщениях

Hello  !
Where you able to think about the evolution of the extension ?
Can you tell me how I could display a pdf inside a post  ?
Thanks

Messages moved from topic: Uploader

2

Re: Просмотр PDF документов в сообщениях

Very good idea, but i not have time for work.
You can enable support .pdf for uploading and browser is open pdf document.

Если вам долго не отвечают, пишите автору темы в личку или на Email.

3

Re: Просмотр PDF документов в сообщениях

I was able to upload a pdf file via pan_uploader, but I got only a link to click and open the pdf in a new tab.

I would like to open the pdf INSIDE the mesage.

4

Re: Просмотр PDF документов в сообщениях

For it nesessery write new extensions. Could you find script for open and read this documents? And I will do it.

Если вам долго не отвечают, пишите автору темы в личку или на Email.

5

Re: Просмотр PDF документов в сообщениях

MaraKat, is nothing complicated, a little zeal and your problems will be solved!

The code to help you:

$file = './path/to/the.pdf';
$filename = 'Custom file name for the.pdf'; /* Note: Always use .pdf at the end. */

header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($file));
header('Accept-Ranges: bytes');

@readfile($file);

6

Re: Просмотр PDF документов в сообщениях

sempai, i think that it is better to write another application for this. She want to the document show in post.
As I understand...  PunBB_INFO_ICQ/pardon

Если вам долго не отвечают, пишите автору темы в личку или на Email.

7

Re: Просмотр PDF документов в сообщениях

Yes exactly.

8

Re: Просмотр PDF документов в сообщениях

Thank you everybody.
You know, I am no coder !
In my other CMS, I am able to include PDF in an iframe. I do not know if it is proper, but it is efficient, even if it is only for visitors who give their browser instructions to read the pdf and not download it.

Here is an example : http://revestou.fr/pages/018-balades-hi … ons-fr.php

Here is the HTML code that I used :

<p style="text-align: center;"><iframe class="embed-responsive-item" name="Histoire du Revest et des Laurons" src="/files/histoire-du-revest-les-laurons-par-gustave-lambert-1884.pdf" scrolling="yes" height="1160px" width="98%"></iframe><br />
</p>

What I would like with pan_uploader is to produce this kind of code in the message after uploading the file. If you think that an iframe is acceptable.

PS : I remind you that with the new version I cannot manage the files anymore (see my post above) : the list of files and images are empty in administration, even if I was able to use some of these files.

9 (edited by PunBB 2017.09.20 09:45)

Re: Просмотр PDF документов в сообщениях

not all browsers support viewing pdf documents. We will try to connect the library of scripts, if there is a success, then a new extension will be released.

Solution 1 -  https://pdfobject.com/generator/

Если вам долго не отвечают, пишите автору темы в личку или на Email.

10

Re: Просмотр PDF документов в сообщениях

MaraKat, Maybe it would be better to display the documents on a separate page than in the message?
For example, you click on a PDF file and it opens in a new window for viewing, or in a darkened window on the same page.

Если вам долго не отвечают, пишите автору темы в личку или на Email.

11 (edited by MaraKat 2017.09.21 23:31)

Re: Просмотр PDF документов в сообщениях

Well... opening in a new tab or window, I can do it already : I upload the pdf via Pan_uploader and clicking  on the displayed link opens the pdf inside the browser in a new tab, according to my browser settings. It is not what I want.

So a new tab is no soluce for what I whish to do. I really would like to open the pdf inside the message. Opening it in a lightbox (above the active tab with a darkened background) would be an alternative possibility, but I like it less.

12

Re: Просмотр PDF документов в сообщениях

Hello ! Where you able to think about this feature ?

13

Re: Просмотр PDF документов в сообщениях

sorry, I would help, but I do not have much time now.

Если вам долго не отвечают, пишите автору темы в личку или на Email.

14

Re: Просмотр PDF документов в сообщениях

Is it possible to use in PunBB something that would give this as source code ?

<div><object data="/files/name-of-file.pdf" type="application/pdf" width="100%" height="1100"></object></div>

15 (edited by PunBB 2018.03.12 00:27)

Re: Просмотр PDF документов в сообщениях

I'll try. What version of the bootloader are you using?

Если вам долго не отвечают, пишите автору темы в личку или на Email.

16

Re: Просмотр PDF документов в сообщениях

I done! More info & discussion in topic https://punbb.info/t-1050.html

Если вам долго не отвечают, пишите автору темы в личку или на Email.