Open a PDF file in a HTML document.

Discussing Html . Code , Software , other

Moderators: gesf, Michalio

Post Reply
User avatar
NorseMan
php-forum Active User
php-forum Active User
Posts: 48
Joined: Mon Jul 04, 2022 5:25 pm
Location: Near Oslo (Norway)

I have a .PDF file I want to open in an HTML document. I do not want to open it as an external PDF file, but should be integrated into a document as it appears as a PDF file. How can this be done?
________________
Leon (Norway)
________________

-------
(some of)My configuration is:
Laragon full 5.0 web server with PHP and MySQL installation
(Apache 2.4.47 / PHP 7.4.19 / MySQL 5.7.33)
-------
My toolbox and workbench:
Navicat for MySQL 16.0.13
FileZilla 3.57.1
Among others
-------
Development toolbox:
Adobe DreamWeaver 21.2
Adobe Photoshop 23.1.0
Adobe Illustrator 26.0.2
Adobe InDesign 17.0.1
Adobe XD
Visual Studio Code 1.63.2 (with some extensions enabled)
User avatar
Michalio
Moderator
Moderator
Posts: 211
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Use pdf.js
https://pdfjs.express/blog/how-to-use-pdf-js
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
User avatar
NorseMan
php-forum Active User
php-forum Active User
Posts: 48
Joined: Mon Jul 04, 2022 5:25 pm
Location: Near Oslo (Norway)

But Michalio, what if i want to open the PDF file inside my page design?

You see, this is a PDF document on about ** pages. It is well formatted both as a WORD and a PDF file. So write and formatting the a new PHP or HTML file is a lot of work and nothing to start to discuss. I know there is a way to import the text.... or the file into the sites design, but i dont remember how. It must be 15 years since i did it las time. Can you please help me?
________________
Leon (Norway)
________________

-------
(some of)My configuration is:
Laragon full 5.0 web server with PHP and MySQL installation
(Apache 2.4.47 / PHP 7.4.19 / MySQL 5.7.33)
-------
My toolbox and workbench:
Navicat for MySQL 16.0.13
FileZilla 3.57.1
Among others
-------
Development toolbox:
Adobe DreamWeaver 21.2
Adobe Photoshop 23.1.0
Adobe Illustrator 26.0.2
Adobe InDesign 17.0.1
Adobe XD
Visual Studio Code 1.63.2 (with some extensions enabled)
User avatar
NorseMan
php-forum Active User
php-forum Active User
Posts: 48
Joined: Mon Jul 04, 2022 5:25 pm
Location: Near Oslo (Norway)

I found this Michalio:

https://convertio.co/pdf-html/

But it was messing too much up. I need your help :help:
________________
Leon (Norway)
________________

-------
(some of)My configuration is:
Laragon full 5.0 web server with PHP and MySQL installation
(Apache 2.4.47 / PHP 7.4.19 / MySQL 5.7.33)
-------
My toolbox and workbench:
Navicat for MySQL 16.0.13
FileZilla 3.57.1
Among others
-------
Development toolbox:
Adobe DreamWeaver 21.2
Adobe Photoshop 23.1.0
Adobe Illustrator 26.0.2
Adobe InDesign 17.0.1
Adobe XD
Visual Studio Code 1.63.2 (with some extensions enabled)
User avatar
Michalio
Moderator
Moderator
Posts: 211
Joined: Sun Jul 18, 2021 1:33 pm
Location: Poland

Pdf.js can display the pdf, and you can embed it on the page as you want. It is described on the Step 2

If you want to use the converter that you found you need to use their API:
https://developers.convertio.co/api/docs/
Free coding lessons: https://php-forum.com/phpforum/viewtopic.php?t=29852
User avatar
NorseMan
php-forum Active User
php-forum Active User
Posts: 48
Joined: Mon Jul 04, 2022 5:25 pm
Location: Near Oslo (Norway)

Thank you. I will look at it once more.
________________
Leon (Norway)
________________

-------
(some of)My configuration is:
Laragon full 5.0 web server with PHP and MySQL installation
(Apache 2.4.47 / PHP 7.4.19 / MySQL 5.7.33)
-------
My toolbox and workbench:
Navicat for MySQL 16.0.13
FileZilla 3.57.1
Among others
-------
Development toolbox:
Adobe DreamWeaver 21.2
Adobe Photoshop 23.1.0
Adobe Illustrator 26.0.2
Adobe InDesign 17.0.1
Adobe XD
Visual Studio Code 1.63.2 (with some extensions enabled)
Post Reply