title: Is there any blade compatible html to pdf converter for php?
body: <p>I have tried dompdf but no luck !</p>
  
  <p>I am using blade template engine with laravel 5 , i want to convert a html file created using blade template engine.</p>
  
  <p>I have used dompdf , tested it with blade syntax , but it throws errors . But when i input normal html page in it , it works and converts the html code to pdf properly.</p>
  
  <p>Please suggest me any html to pdf converter which is blade compatible!</p>
  
  <p>Please help guys :)</p>
  
  <pre><code>&lt;body class="homepage skin-blue fixed"&gt;
      &lt;input type="hidden" name="_token" id="_token" value="{{ csrf_token() }}" /&gt;
      &lt;div class="header1"&gt;
          &lt;div class="slider1"&gt;
              &lt;li class="cards"&gt;
                  &lt;span class="closeFeedback"&gt;&lt;/span&gt;
  
              &lt;li class="heading_orange"&gt;&lt;a&gt;Heading&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;
                  &lt;ul class="inline_text"&gt;
  
                      &lt;li&gt;
                          &lt;a&gt;AZ&lt;/a&gt;
                          &lt;a&gt;&lt;p&gt;FLAG&lt;/p&gt;&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a&gt;{{$data-&gt;er-&gt;name}}&lt;/a&gt;
                          &lt;a&gt;
                              {!!Form::select('tenure',$data-&gt;terms,$data-&gt;id,array('class'=&gt;'form-control tenure','style'=&gt;'margin-left: -6%;margin-top: -5%;width: 112%'));!!}
                          &lt;/a&gt;
                          &lt;a&gt;Marks &lt;span class="list_number"&gt;2&lt;/span&gt;&lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;             
  
              &lt;/li&gt;
              &lt;li class="councillor_box bgcolor_faintwhite "&gt;&lt;a&gt;Age &lt;span class="list_number"&gt;{{$data-&gt;age}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  
              &lt;li class="bgcolor_lightblue bgcolor_faintwhite"&gt;&lt;a class="text_align_left"&gt;Questions Asked&lt;/a&gt;
                  &lt;ul&gt;
                      @foreach($data-&gt;question_count as $question)
                      &lt;li class="box_border"&gt;&lt;a&gt;{{$question-&gt;name}}&lt;span class="list_number"&gt;{{$question-&gt;count}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                      @endforeach
                      &lt;li class="box_border see_more" type="questionAsked"&gt;&lt;a&gt;See more&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
  
              &lt;li class="bgcolor_faintwhite bgcolor_lightblue"&gt;&lt;a class="text_align_left"&gt;Money Spent&lt;/a&gt;
                  &lt;ul&gt;
                      @foreach($data-&gt;money_spent_count as $money)
                      &lt;li class="box_border"&gt;&lt;a&gt;{{$money-&gt;name}}&lt;span class="list_number"&gt;{{$money-&gt;actual_spent_amount}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                      @endforeach
                      &lt;li class="box_border see_more" type="moneySpent"&gt;&lt;a&gt;See more&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
  
              &lt;li class="bgcolor_faintwhite bgcolor_lightblue"&gt;&lt;a&gt;Attendance &lt;b class="heading_number_councillor_attendance"&gt;65%&lt;/b&gt;&lt;/a&gt;
                  &lt;ul&gt;
                      &lt;li id="third_level_first"&gt;&lt;a class="light_orange"&gt;2015 &lt;b&gt;65%&lt;/b&gt;&lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;General Body Meetings
                                      &lt;span class="text_right"&gt;00&lt;/span&gt;&lt;/a&gt;
  
                              &lt;/li&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;Committee 1
                                      &lt;span class="text_right"&gt;00&lt;/span&gt;&lt;/a&gt;
                              &lt;/li&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;Committee 2
                                      &lt;span class="text_right"&gt;00&lt;/span&gt;&lt;/a&gt;
                              &lt;/li&gt;
                          &lt;/ul&gt;            
                      &lt;/li&gt;
  
                  &lt;/ul&gt;
              &lt;/li&gt;    
  
              &lt;li class="councillor_box bgcolor_faintwhite bgcolor_lightblue"&gt;&lt;a&gt;Issues&lt;/a&gt;
                  &lt;ul&gt;
  
                      &lt;li id="third_level_first"&gt;&lt;a class="light_orange"&gt;Civic 
                          &lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange tinybox_border"&gt;Top Civic Issues&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Civic['issue']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Civic['issue'] as $issue)
                              &lt;li class="issues" issue_type = "civic"&gt;&lt;a class=" bg_light_orange"&gt;{{$issue['name']}}&lt;span class="text_right"&gt;{{$issue['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
  
                              &lt;li id="third_level_second"&gt;&lt;a class="amit bg_light_orange text_center"&gt;Questions Asked on Civic Issues&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Civic['question']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Civic['question'] as $question)
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
                          &lt;/ul&gt;
                      &lt;/li&gt;
                      &lt;li id="third_level_first"&gt;&lt;a class="light_orange"&gt;Health 
                          &lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange tinybox_border" &gt;Top Diseases/Ailments&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Health['issue']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Health['issue'] as $question)
                              &lt;li class="issues" issue_type = "health"&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
  
                              &lt;li id="third_level_second"&gt;&lt;a class="bg_light_orange text_center"&gt;Questions asked on Health&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Health['question']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Health['question'] as $question)
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
                          &lt;/ul&gt;
                      &lt;/li&gt;
  
  
                      &lt;li id="third_level_first"&gt;&lt;a class="light_orange"&gt;Education 
                          &lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange tinybox_border" &gt;Statistics&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Education['issue']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Education['issue'] as $question)
                              &lt;li class="issues" issue_type = "education"&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
  
                              &lt;li id="third_level_second"&gt;&lt;a class="bg_light_orange text_center"&gt;Questions Asked on Education&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Education['question']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Education['question'] as $question)
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
                          &lt;/ul&gt;
                      &lt;/li&gt;
  
                      &lt;li id="third_level_first"&gt;&lt;a class="light_orange"&gt;Other 
                          &lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a class=" bg_light_orange tinybox_border" &gt;Issues&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Crime['issue']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Crime['issue'] as $question)
                              &lt;li class="issues" issue_type = "crime"&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
  
                              &lt;li id="third_level_second"&gt;&lt;a class="bg_light_orange text_center"&gt;Questions Asked on Other Issues&lt;/a&gt;&lt;/li&gt;
  
                              @if(empty($data-&gt;Crime['question']))
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;None&lt;/a&gt;&lt;/li&gt;
                              @else
                              @foreach($data-&gt;Crime['question'] as $question)
                              &lt;li&gt;&lt;a class=" bg_light_orange"&gt;{{$question['name']}}&lt;span class="text_right"&gt;{{$question['count']}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              @endforeach
                              @endif
  
  
                          &lt;/ul&gt;
                      &lt;/li&gt;
  
                  &lt;/ul&gt;
              &lt;/li&gt; 
              &lt;li class="bgcolor_faintwhite bgcolor_darkblue"&gt;&lt;a &gt;Contact&lt;/a&gt;
                  &lt;ul&gt;
                      &lt;li class="nine_px smallbox_border full_width"&gt;&lt;a class=" text_left full_width" &gt;For All Complaints
                              &lt;span class="text_right"&gt;1916&lt;/span&gt;&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class="full_width address_box"&gt;&lt;a class=" text_left nine_px" &gt;{{$data-&gt;erDetails-&gt;address}},{{$data-&gt;erDetails-&gt;city_name}},{{$data-&gt;erDetails-&gt;pincode}},{{$data-&gt;erDetails-&gt;state_name}}&lt;/a&gt;&lt;/li&gt;
                      &lt;li class="contact_social nine_px"&gt;
  
                          &lt;a class=" full_width"&gt;WEBSITE&lt;/a&gt;
                          &lt;a class=" full_width"&gt;F&lt;/a&gt;
                          &lt;a class=" full_width"&gt;T&lt;/a&gt;
  
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
              &lt;li class="bgcolor_faintwhite equalbox"&gt;&lt;a &gt;Other Councillors From Same Ward (H/W)&lt;/a&gt;&lt;/li&gt;
              &lt;li class="bgcolor_faintwhite equalbox"&gt;&lt;a &gt;Other ERs In Constituency&lt;/a&gt;&lt;/li&gt;
              &lt;li class="bgcolor_faintwhite equalbox"&gt;&lt;a &gt;Top &amp; Bottom Councillors of Mumbai&lt;/a&gt;&lt;/li&gt;
              &lt;li class="bgcolor_faintwhite equalbox"&gt;&lt;a &gt;Download Report Card&lt;/a&gt;&lt;/li&gt;
  
              &lt;li class="social_network"&gt;
  
                  &lt;span class="pad_0px"&gt;
                      &lt;a onclick="openShareDialog('facebook', this);" data-link=""&gt;Share&lt;/a&gt;
                      &lt;a onclick="openShareDialog('twitter', this);" data-link=""&gt;Tweet&lt;/a&gt;
                      &lt;a class="download"&gt;Download&lt;/a&gt;
                  &lt;/span&gt;
  
              &lt;/li&gt;
              &lt;/ul&gt;
              &lt;/li&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="example-modal"&gt;
          &lt;div class="modal" id='message-modal'&gt;
          &lt;/div&gt; 
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>This is my php blade view file which is to be downloaded as pdf.</p>
  
  <p>The pdf conversion is as follows</p>
  
  <pre><code>$html = App::make('dompdf.wrapper');
      $html = $html-&gt;loadHtml(view('cards.pdf_card',compact('data'))-&gt;render());
  
      return $html-&gt;download('card.pdf');
  </code></pre>
  
  <p>The 'data' here is considered to be generated before. </p>
  
  <p>The error is as follows,</p>
  
  <pre><code>ErrorException in frame.cls.php line 765:
  Argument 1 passed to DOMNode::appendChild() must be an instance of  DOMNode, null given, called in     /opt/lampp/htdocs/brt_praja/vendor/dompdf/dompdf/include/table_frame_decorator.cls.php on line 312 and defined
  </code></pre>
  
  <p>Thanks in advance for some help. </p>