Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Need to extract only html without dom object. #8

Closed
kartikkapatel opened this issue Jan 8, 2016 · 7 comments
Closed

Need to extract only html without dom object. #8

kartikkapatel opened this issue Jan 8, 2016 · 7 comments

Comments

@kartikkapatel
Copy link

First of all thank You for such wonderful library.
it was very help full to me and i also just need the only html from $html = $pdf->html(); object.

@mgufrone
Copy link
Owner

mgufrone commented Jan 8, 2016

Do you mean it should return html string, instead of dom object?

@kartikkapatel
Copy link
Author

No it's return dom object but i need only content of that page , do u have any function that help to get only direct string?? if u have any wiki of the library then please share with us. thank you

@fengkaijia
Copy link

So, is there any way to return the HTML string? My main project use DomCrawler from Symfony so it would be nice if I can just get and pass the html string to my current parser.

@mgufrone
Copy link
Owner

Sorry for late response. I am unable to continue this project for my own work. I will continue to improve this package as soon as possible. thanks for the suggestion. 👍

@mgufrone
Copy link
Owner

$pdf->html() will now return as html string.
if you want to get the dom object, just use $pdf->getDom();

please test it on your own. I already tested it, but I would like you guys to test this too.

@fengkaijia
Copy link

@mgufrone Tested and it's working now without any issue 👏, although the html() method still calls the getDom() to extract HTML which might cost some performance when dealing with a large PDF.

@mgufrone
Copy link
Owner

mgufrone commented May 7, 2016

great. I'm still working on it so it will directly return as html.

@mgufrone mgufrone closed this as completed May 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants