<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmed Nawaz Butt</title>
    <description>The latest articles on DEV Community by Ahmed Nawaz Butt (@ahmednawazbutt).</description>
    <link>https://dev.to/ahmednawazbutt</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F334515%2F0ac64b52-7dce-4962-a1d6-ba55717c1250.jpeg</url>
      <title>DEV Community: Ahmed Nawaz Butt</title>
      <link>https://dev.to/ahmednawazbutt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmednawazbutt"/>
    <language>en</language>
    <item>
      <title>See the file contents before generating PDF Output - PHP -Mpdf</title>
      <dc:creator>Ahmed Nawaz Butt</dc:creator>
      <pubDate>Wed, 12 Feb 2020 10:47:59 +0000</pubDate>
      <link>https://dev.to/ahmednawazbutt/see-the-file-contents-before-generating-pdf-output-php-mpdf-57hp</link>
      <guid>https://dev.to/ahmednawazbutt/see-the-file-contents-before-generating-pdf-output-php-mpdf-57hp</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/60186522/how-to-see-the-pdf-file-contents-before-creating-the-pdf-file-using-mpdf" rel="noopener noreferrer"&gt;
               How to see the pdf file contents before creating the pdf file using mpdf
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Feb 12 '20&lt;/span&gt;
            &lt;span&gt;Comments: 1&lt;/span&gt;
            &lt;span&gt;Answers: 1&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/60186522/how-to-see-the-pdf-file-contents-before-creating-the-pdf-file-using-mpdf" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Link to my JsFiddle (&lt;strong&gt;&lt;a href="https://jsfiddle.net/ahmednawazbutt/ukvn4fxe/3/" rel="nofollow noreferrer"&gt;Desired Output&lt;/a&gt;&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Target&lt;/strong&gt;:
The HTML I get there is exactly what I need in my PDF but when I try to generate a PDF using mPdf library in my codeigniter controller, the &lt;a href="https://drive.google.com/file/d/1-5MZrZEwuinuQKWVCs-J3g6fZ6MOxMSJ/view?usp=sharing" rel="nofollow noreferrer"&gt;Output&lt;/a&gt; looks terrible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;
I want to find a way…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/60186522/how-to-see-the-pdf-file-contents-before-creating-the-pdf-file-using-mpdf" rel="noopener noreferrer"&gt;Open Full Question&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>mpdf output document to html</title>
      <dc:creator>Ahmed Nawaz Butt</dc:creator>
      <pubDate>Wed, 12 Feb 2020 09:55:33 +0000</pubDate>
      <link>https://dev.to/ahmednawazbutt/mpdf-output-document-to-html-5cj5</link>
      <guid>https://dev.to/ahmednawazbutt/mpdf-output-document-to-html-5cj5</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pTF_nE4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/48139954/mpdf-output-document-to-html" rel="noopener noreferrer"&gt;
               mpdf output document to html
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan  7 '18&lt;/span&gt;
            &lt;span&gt;Comments: 4&lt;/span&gt;
            &lt;span&gt;Answers: 0&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/48139954/mpdf-output-document-to-html" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5MiFESHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          2
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk_a5QFN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Can I output the mpdf document as HTML string or file instead of a pdf? It will be helpful for debugging. &lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$mpdf-&amp;gt;WriteHTML($page_config_css, 1);
$mpdf-&amp;gt;SetHTMLHeader($header_first_page);
$mpdf-&amp;gt;WriteHTML($output_first_page);
$mpdf-&amp;gt;SetHTMLHeader($header);
$mpdf-&amp;gt;SetHTMLFooter($footer);
$mpdf-&amp;gt;WriteHTML($main_content);

// Can I output it at this stage as html for inspection? 

$mpdf-&amp;gt;Output();
&lt;/code&gt;&lt;/pre&gt;

    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/48139954/mpdf-output-document-to-html" rel="noopener noreferrer"&gt;Open Full Question&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
  </channel>
</rss>
