Git Product home page Git Product logo

Comments (35)

thujohn avatar thujohn commented on August 11, 2024

You can generate your view with your data and print it.

Route::get('pdf-from-view', function()
{
    $data = array();
    $html = View::make('my-view', $data);
    return PDF::load($html, 'A4', 'portrait')->show();
});

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

Obs: I am trying do it in a controller method.

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to a member function prepend_child() on a non-object

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

In the routes or in a controller the result is the same.

I can't help you with only this error.

You should print your datas and/or view to check problems.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

After, I need remove this comment with the code.
My method:

    public function imprimir($id)
    {

        $orcamento = Orcamento::find($id);

        $orcamento['dataIni']           = ($orcamento['dataIni']) ? HelperRS::data($orcamento['dataIni'], 'br') : '';
        $orcamento['dataFim']           = ($orcamento['dataFim']) ? HelperRS::data($orcamento['dataFim'], 'br') : '';
        $orcamento['dataUltMudanca']    = ($orcamento['dataUltMudanca']) ? HelperRS::data($orcamento['dataUltMudanca'], 'br') : '';
        $orcamento['s_dataIni']         = ($orcamento['s_dataIni']) ? HelperRS::data($orcamento['s_dataIni'], 'br') : '';
        $orcamento['s_dataFim']         = ($orcamento['s_dataFim']) ? HelperRS::data($orcamento['s_dataFim'], 'br') : '';

        $observacoes = Observacao::where('id_orcamento', $orcamento->id_orcamento)->get();
        $solicitacoes = Solicitacao::where('id_orcamento', $orcamento->id_orcamento)
                                    ->with('servicos')->orderBy('solicitacao', 'asc')->get();

        $cliente = Cliente::find($orcamento->id_cliente)->toArray();
        $cliente['Data_Nasc'] = HelperRS::data($cliente['Data_Nasc'], 'br');

        $html = View::make('orcamentos.print', array(
                                                    'orcamento' => $orcamento, 
                                                    'cliente' => $cliente, 
                                                    'observacoes' => $observacoes,
                                                    'solicitacoes' => $solicitacoes));
        return PDF::load($html, 'A4', 'portrait')->show();

My view:

<!DOCTYPE html>
<html> 
<head>
<!-- Meta, title, CSS, favicons, etc. -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>AM Luz e Som - Painel</title>

<!-- Core CSS  -->
{{ HTML::style('css/bootstrap.min.css'); }}
{{ HTML::style('css/theme.css'); }}

</head>

<body>
<div id="main">
  <div class="container">

    <div class="row">
        <div class="col-xs-12">
          <div class="panel">
            <div class="panel-body list-view-custom">

            <div class="cabecalho">
                <img src="{{ URL::asset('/img/logo_orc.jpg') }}" />
                <div class="texto">A AM Luz e Som é uma empresa especializada em soluções e novas tecnologias para o seu evento. Visite o site <a href="www.amluzesom.com.br" target="blank">www.amluzesom.com.br</a></div>
            </div>

              <!-- Informacoes do cliente -->
              <h5>Dados do cliente</h5>
              <div class="col-xs-6"><span>Nome / Razão Social</span>
                {{{$cliente['Nome_RS'] or ''}}}</div>
              <div class="col-xs-6"><span>Representante Legal</span>
                {{{$cliente['representante'] or ''}}}</div>
              <div class="col-xs-3"><span>CPF / CNPJ</span>
                {{{$cliente['CPF_CNPJ'] or ''}}}</div>
              <div class="col-xs-3"><span>CGA</span>
                {{{$cliente['cga'] or ''}}}</div>
              <div class="col-xs-3"><span>RG / ME / IM</span>
                {{{$cliente['RG_IE'] or ''}}}</div>
              <div class="col-xs-3"><span>Data de Nascimento</span>
                {{{$cliente['Data_Nasc'] or ''}}}</div>
              <div class="col-xs-6"><span>E-mail</span>
                {{{$cliente['EMail_Cliente'] or ''}}}</div>
              <div class="col-xs-6"><span>Contato</span>
                {{{$cliente['Contato'] or ''}}}</div>
              <div class="col-xs-3"><span>Telefone Residencial</span>
                {{{$cliente['Tel_Residencial'] or ''}}}</div>
              <div class="col-xs-3"><span>Telefone Comercial</span>
                {{{$cliente['Tel_Comercial'] or ''}}}</div>
              <div class="col-xs-3"><span>Celular</span>
                {{{$cliente['Tel_Celular'] or ''}}}</div>
              <div class="col-xs-3"><span>Fax</span>
                {{{$cliente['Tel_Fax'] or ''}}}</div>

              <div class="col-xs-6"><span>Quem indicou</span>
                {{{$cliente['indicou'] or ''}}}</div>
              <div class="col-xs-6"><span>Fonte Divulgadora</span>
                {{{$cliente['Fonte_Div'] or ''}}}</div>

              <!-- Endereco -->
              <h5>Endereço do cliente</h5>
              <div class="col-xs-6"><span>Endereço</span>
                {{{$cliente['Endereco'] or ''}}}</div>
              <div class="col-xs-6"><span>Complemento</span>
                {{{$cliente['Ponto_de_Referencia'] or ''}}}</div>         
              <div class="col-xs-2"><span>CEP</span>
                {{{$cliente['Cep'] or ''}}}</div>
              <div class="col-xs-2"><span>Estado</span>
                {{{$cliente['Estado'] or ''}}}</div>
              <div class="col-xs-4"><span>Cidade</span>
                {{{$cliente['Cidade'] or ''}}}</div>
              <div class="col-xs-4"><span>Bairro</span>
                {{{$cliente['Bairro'] or ''}}}</div>

              <!-- Informacoes do evento --> 
              <h5>Informações do evento</h5>
              <div class="col-xs-4"><span>Tipo do evento</span>
                {{{$orcamento['tipoEvento'] or ''}}}</div>
              <div class="col-xs-8"><span>Nome do evento</span>
                {{{$orcamento['nomeEvento'] or ''}}}</div>
              <div class="col-xs-6"><span>Local do Evento</span>
                {{{$orcamento['localEvento'] or ''}}}</div>
              <div class="col-xs-3"><span>Data inicial</span>
                {{{$orcamento['dataIni'] or ''}}}</div>
              <div class="col-xs-3"><span>Data final</span>
                {{{$orcamento['dataFim'] or ''}}}</div>
              <div class="col-xs-4"><span>Cidade</span>
                {{{$orcamento['cidade'] or ''}}}</div>
              <div class="col-xs-2"><span>Estado</span>
                {{{$orcamento['estado'] or ''}}}</div>
               <div class="col-xs-3"><span>Orçamento nº</span>
                {{{$orcamento['nOrcamento'] or ''}}}</div>
              <div class="col-xs-3"><span>Elaborado por</span>
                {{{$orcamento['elaboradoPor'] or ''}}}</div>
              <div class="col-xs-12"><span>Tipo do orçamento</span>
                {{{$orcamento['tipoOrcamento'] or ''}}}</div>
              <div class="col-xs-3"><span>Ult. mudança</span>
                {{{$orcamento['dataUltMudanca'] or ''}}}</div>
              <div class="col-xs-9"><span>Relação material</span>
                {{{$orcamento['relacaoMaterial'] or ''}}}</div>
              <div class="col-xs-12"><span>Validade do orçamento</span>
                {{{$orcamento['validade'] or ''}}}</div>
              <div class="col-xs-8"><span>Forma de pagamento</span>
                {{{$orcamento['formaPgto'] or ''}}}</div>

                @if(count($observacoes) > 0)
                <h5>Observações</h5>
                <!--div class="panel"-->
                  <table class="table table-bordered table-servicos">
                    <tbody>
                    @foreach($observacoes as $observacao)
                    <tr>
                        <td style="width: 50px;">{{HelperRS::data($observacao['data'],'br')}}</td>
                        <td>{{$observacao['observacao']}}</td>
                    </tr>
                    @endforeach
                    </tbody>
                  </table>
                <!--/div-->     
                @endif

              <!-- Solicitacao intervencao  -->
              <?php $s = 1; ?>
              @foreach($solicitacoes as $solicitacao)
                  <h5>Solicitação {{$s}}</h5>
                  <div class="col-xs-6"><span>Local</span>
                    {{{$solicitacao['local'] or ''}}}</div>
                  <div class="col-xs-2"><span>Nº Pax</span>
                    {{{$solicitacao['nPax'] or ''}}}</div>
                  <div class="col-xs-2"><span>Data inicial</span>
                    {{{HelperRS::data($solicitacao['dataIni'],'br')}}}</div>
                  <div class="col-xs-2"><span>Data final</span>
                    {{{HelperRS::data($solicitacao['dataFim'],'br')}}}</div>
                  <div class="col-xs-1"><span>Diárias</span>
                    {{{$solicitacao['diarias'] or ''}}}</div>
                  <div class="col-xs-2"><span>Desconto</span>
                    {{{$solicitacao['desconto'] or ''}}}</div>
                  <div class="col-xs-3"><span>Total</span>
                    {{{$solicitacao['total'] or ''}}}</div>
                  <div class="col-xs-3"><span>Horário Inicio</span>
                    {{{$solicitacao['horaIni'] or ''}}}</div>
                  <div class="col-xs-3"><span>Horário Fim</span>
                    {{{$solicitacao['horaFim'] or ''}}}</div>

                    <!--h5>Serviços</h5-->
                      <table class="table table-bordered table-servicos">
                        <thead>
                          <tr>
                            <th>Qtd.</th>
                            <th>Dias</th>
                            <th>Serviços solicitação {{$s}}</th>
                            <th>Desconto</th>
                            <th>Valor</th>
                            <th>Total</th>
                          </tr>
                        </thead>
                        <tbody>
                        @foreach($solicitacao->servicos as $servico)
                        <?php 
                        if($servico->solicitacao != $s) continue; 
                        $totalSolicitacao = ($servico->qtd * $servico->valor) * $servico->diarias;
                        ?>
                        <tr>
                            <td>{{$servico['qtd']}}</td>
                            <td>{{$servico['diarias']}}</td>
                            <td>{{HelperRS::getNomeServico($servico->id_servico)}}</td>
                            <td>{{$servico->desconto}}</td>
                            <td>{{HelperRS::real($servico->valor,'br')}}</td>
                            <td>{{HelperRS::real($totalSolicitacao,'br')}}</td>
                        </tr>
                        @endforeach
                        </tbody>
                      </table>

                <?php $s++; ?>
              @endforeach     

                <div class="rodape">
                    @if($orcamento['loginUsuario'] == 'nilma')
                        <div class="ass"><img src="{{ URL::asset('/img/ass_nilma.jpg') }}" /></div>
                    @else
                        <div class="ass"><img src="{{ URL::asset('/img/ass_marcelo.jpg') }}" /></div>
                    @endif
                    <div class="carimbo"><img src="{{ URL::asset('/img/carimbo.jpg') }}" width="160" /></div>
                    <div class="texto">
                        <b>Razão Social:</b>   AM Luz e Som Ltda <br>
                        <b>Endereço:</b>   Rua Professora Maria Helena Fonseca, nº 231, Farol de Itapoan, Salvador - Bahia - Brasil <br>
                        <b>CEP:</b> 41.630-275&nbsp;&nbsp;&nbsp;<b>CNPJ:</b> 06.180.501/0001-83&nbsp;&nbsp;&nbsp;<b>IE:</b> 089.972.267 - ME   <b>IM:</b> 245.990/001-14<br>
                        <b>PABX:</b> 71-3377-4545&nbsp;&nbsp;&nbsp;<b>Site:</b> www.amluzesom.com.br&nbsp;&nbsp;&nbsp;<b>E-mail:</b> [email protected]<br>
                        <b>Contatos Marcelo</b>   <b>E-mail:</b> [email protected]&nbsp;&nbsp;&nbsp;<b>Celulares:</b> 71-8802-6665 (oi) 8276-1005(Vivo)<br>
                        <b>Contatos Nilma</b>   <b>E-mail:</b> [email protected]&nbsp;&nbsp;&nbsp;<b>Celulares:</b> 71-8802-6662 (oi) 9624-6031 (Vivo)
                    </div>
                </div>

            </div><!--./panel-body-->
          </div>
        </div>
    </div>

  </div>
</div>
</body>
</html>

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

You can remove the code it's in the mail ;)

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

Take it easy

On Tue, Jun 24, 2014 at 4:47 PM, Jonathan Thuau [email protected]
wrote:

You can remove the code it's in the mail ;)


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

If you only return your view everything work ?

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

Yep

On Tue, Jun 24, 2014 at 4:52 PM, Jonathan Thuau [email protected]
wrote:

If you only return your view everything work ?


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

Can you send me the stack trace ?

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

How get in Laravel??

On Tue, Jun 24, 2014 at 4:55 PM, Jonathan Thuau [email protected]
wrote:

Can you send me the stack trace ?


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

When you have the error.

At least a screenshot.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

http://w3bahia.com.br/projetos/am-orcamento/public/orcamento/imprimir/33

On Tue, Jun 24, 2014 at 5:01 PM, Jonathan Thuau [email protected]
wrote:

When you have the error.

At least a screenshot.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

The problem comes from some rules in your css.

dompdf/dompdf#758

Can you try without every ":before" and ":after" ?

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

I'll try it

On Tue, Jun 24, 2014 at 5:05 PM, Jonathan Thuau [email protected]
wrote:

The problem comes from some rules in your css.

dompdf/dompdf#758 dompdf/dompdf#758

Can you try without every ":before" and ":after" ?


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

There is a lot of before and after on bootstrap. :/

On Tue, Jun 24, 2014 at 5:08 PM, Rafael Soufraz [email protected]
wrote:

I'll try it

On Tue, Jun 24, 2014 at 5:05 PM, Jonathan Thuau [email protected]
wrote:

The problem comes from some rules in your css.

dompdf/dompdf#758 dompdf/dompdf#758

Can you try without every ":before" and ":after" ?


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

I see...

I don't know if this bug has been corrected but you can try this package (with the latest version) : https://github.com/barryvdh/laravel-dompdf

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

After the exchange of the library, appeared more errors. It was his choice
to stay with it.
http://w3bahia.com.br/projetos/am-orcamento/public/orcamento/imprimir/33

On Tue, Jun 24, 2014 at 5:20 PM, Jonathan Thuau [email protected]
wrote:

I see...

I don't know if this bug has been corrected but you can try this package
(with the latest version) : https://github.com/barryvdh/laravel-dompdf


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

The error comes from this :

<?php echo Auth::user()->nome; ?>

This is normal because I'm not logged in.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

There is not Auth echo in print template

On Tue, Jun 24, 2014 at 6:15 PM, Jonathan Thuau [email protected]
wrote:

The error comes from this :

nome; ?>

This is normal because I'm not logged in.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

This is what I see :

<button type="button" class="btn btn-default btn-gradient btn-sm dropdown-toggle" data-toggle="dropdown"> <span class="glyphicons glyphicons-user"></span> <b><?php echo Auth::user()->nome; ?></b> </button>

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

I remove all for the print template and the same error is showing.
I think that I will make a clean css and use your library.

On Tue, Jun 24, 2014 at 6:23 PM, Rafael Soufraz [email protected]
wrote:

There is not Auth echo in print template

On Tue, Jun 24, 2014 at 6:15 PM, Jonathan Thuau [email protected]
wrote:

The error comes from this :

nome; ?>

This is normal because I'm not logged in.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

When you see that? There is not any button in my view.

On Tue, Jun 24, 2014 at 6:25 PM, Rafael Soufraz [email protected]
wrote:

I remove all for the print template and the same error is showing.
I think that I will make a clean css and use your library.

On Tue, Jun 24, 2014 at 6:23 PM, Rafael Soufraz <[email protected]

wrote:

There is not Auth echo in print template

On Tue, Jun 24, 2014 at 6:15 PM, Jonathan Thuau <[email protected]

wrote:

The error comes from this :

nome; ?>

This is normal because I'm not logged in.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

Here : http://w3bahia.com.br/projetos/am-orcamento/public/orcamento/imprimir/33

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

I not see this error.
Below the error. I already set 777 on the storage. But nothing.

ErrorException

file_put_contents(/home/w3bahiac/public_html/projetos/am-orcamento/app/storage/fonts/bf11512877ef2223afd06e89358ef2fc.ttf):
failed to open stream: No such file or direct

On Tue, Jun 24, 2014 at 6:28 PM, Jonathan Thuau [email protected]
wrote:

Here :
http://w3bahia.com.br/projetos/am-orcamento/public/orcamento/imprimir/33


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

Look at the link right now.

On Tue, Jun 24, 2014 at 6:32 PM, Rafael Soufraz [email protected]
wrote:

I not see this error.
Below the error. I already set 777 on the storage. But nothing.

ErrorException

file_put_contents(/home/w3bahiac/public_html/projetos/am-orcamento/app/storage/fonts/bf11512877ef2223afd06e89358ef2fc.ttf):
failed to open stream: No such file or direct

On Tue, Jun 24, 2014 at 6:28 PM, Jonathan Thuau [email protected]
wrote:

Here :
http://w3bahia.com.br/projetos/am-orcamento/public/orcamento/imprimir/33


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

You should place your fonts in your public folder.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

My fonts are there..
Do you use gtalk?

On Tue, Jun 24, 2014 at 6:36 PM, Jonathan Thuau [email protected]
wrote:

You should place your fonts in your public folder.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

Yes but it's a little too late for tonight.

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

I meant chat. Not hangout. Sorry for the time.
I'm in Brazil and I have missed it. :)

On Tue, Jun 24, 2014 at 6:46 PM, Jonathan Thuau [email protected]
wrote:

Yes but it's a little too late for tonight.


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

Me in France and it's time to sleep :)

from pdf-l4.

Soufraz avatar Soufraz commented on August 11, 2024

I Got something. I do not abuse you more today.
Tomorrow I send you the answer of success. ;)
Bonne nuit!

On Tue, Jun 24, 2014 at 6:50 PM, Jonathan Thuau [email protected]
wrote:

Me in France and it's time to sleep :)


Reply to this email directly or view it on GitHub
#50 (comment).

Att,
Rafael Soufraz
Analista de Sistemas
(71) 8731-5195 / 9337-5966

Não podemos deixar a nossa ira bloquear a nossa confiança na habilidade
que Deus tem de derrotar o mal.

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

Obrigado :)

from pdf-l4.

Lloople avatar Lloople commented on August 11, 2024

I'm having the same error, with bootstrap too. Any solution for now?

Thanks for the package Thujohn, very simply and helpful.

from pdf-l4.

manishkvaish avatar manishkvaish commented on August 11, 2024

i have included your library via composer update and actually i need to show already existing view files to show as pdf.
consequently i am trying the similiar code ,
$data = array();
$html = View::make('website_visits', $data);
return PDF::load($html, 'A4', 'portrait')->show();
here website_visits is the website_visits_blade.php in my view folder.
but every time i try anything it gives the error : Undefined offset: 0

from pdf-l4.

thujohn avatar thujohn commented on August 11, 2024

@Lloople I think the best solution is to use https://github.com/barryvdh/laravel-dompdf

@manishkvaish You view needs to be named "website_visits.blade.php".
$html should contain View::make('website_visits', $data)->render()
Before calling PDF you can simply display the view for debugging.

from pdf-l4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.