Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ralee's avatar

PDF to HTML

hi guys,
This may not be the best place to ask this. But since i am using Laravel, i hope someone have done this before and wouldn't mind sharing some guidance.

I am trying to upload PDF files and convert them into html format and in the process store them in the database. Does anyone know of a library i can use for this?

Really do appreciate the help here.

Cheers
Ralee

0 likes
6 replies
thisrahul's avatar

@ralee Hey Ralee..

I come across the same requirement to convert pdf to html and store into databse. Can you please guide me how you achieved this..m It would save my lots of hours.

Thanks

ralee's avatar

Hi Guys,
I finally managed to get it to work. I installed poppler utils on my local instead of my homestead. Rookie mistake. Anyway does anyone know how i can access the #content?

Image and video hosting by TinyPic

Cheers,
Ralee

cimrie's avatar

Hi Ralee,

Let us call the object you are outputting in that screenshot $html_output. You should be able to call $html_output->contents to get the array. If you want the actual HTML you should be able to use the following in this case:

$html_output->contents[1] as the HTML body looks to be located at index 1.

Please or to participate in this conversation.