# Pdf with php

**URL:** <https://forum.kirupa.com/t/pdf-with-php/265899>\
**Category:** Uncategorized\
**Created:** [July 14, 2008, 1:05pm UTC](https://forum.kirupa.com/t/pdf-with-php/265899 "2008-07-14T13:05:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1olf](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@wo1olf](https://forum.kirupa.com/u/wo1olf)\
**Post date:** [July 14, 2008, 1:05pm UTC](https://forum.kirupa.com/t/pdf-with-php/265899/1 "2008-07-14T13:05:50Z")

</div>

i have this script that creat pdf form a text in a DB. But i want to know how can i remove html tags and html entities. Because when i print, they all appear. What i want is to have the pdf the sameformating as if ti was the web page. can anybody help me with it?

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [July 14, 2008, 1:30pm UTC](https://forum.kirupa.com/t/pdf-with-php/265899/2 "2008-07-14T13:30:32Z")

</div>

Need to see the script, but it’s more than likely you can do a strip\_tags to the content as it gets to the processor

---

<div class="post-metadata">

**Author:** ![Charleh](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@Charleh](https://forum.kirupa.com/u/Charleh)\
**Post date:** [July 14, 2008, 2:26pm UTC](https://forum.kirupa.com/t/pdf-with-php/265899/3 "2008-07-14T14:26:12Z")

</div>

It sounds like your script doesn’t convert the HTML layout to PDF layout. Stripping the text of HTML chars will work but you won’t get the same layout as was displayed by the HTML. Try looking around for a PDF maker script/library which supports direct HTML feeding or double check your script to make sure there are no methods/properties you haven’t seen/tried

---

<div class="post-metadata">

**Author:** ![Utech22](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@Utech22](https://forum.kirupa.com/u/Utech22)\
**Post date:** [July 16, 2008, 2:41am UTC](https://forum.kirupa.com/t/pdf-with-php/265899/4 "2008-07-16T02:41:14Z")

</div>

Off topic  
_Simplistik can you kindly render me some assistance here:  
 [http://www.kirupa.com/forum/showthread.php?t=303468](http://www.kirupa.com/forum/showthread.php?t=303468)_
