Skip to main content
removeu 1998 caracteres do conteúdo
Fonte Link

SAÍDA:

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

/MediaBox [0.000 0.000 612.000 792.000]

endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (þÿdompdf <5113accd> + CPDF) /CreationDate (D:20171207123529+00'00') /ModDate (D:20171207123529+00'00') /Title (þÿRelatório de Pedidos)

endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 612.000 792.000] /Parent 3 0 R /Contents 7 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ�¨Ø°b�cËéƱ¢ùf�Ï�scÐ|�ó¤BÆ X¡QI�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè%h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding

endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding

endobj 11 0 obj << /Type /Font /Subtype /Type1 /Name /F4 /BaseFont /Helvetica /Encoding /WinAnsiEncoding

endobj xref 0 12 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000306 00000 n 0000000335 00000 n 0000000546 00000 n 0000000649 00000 n 0000001276 00000 n 0000001385 00000 n 0000001497 00000 n 0000001606 00000 n trailer << /Size 12 /Root 1 0 R /Info 5 0 R /ID[<23051dd559d1dc24aeb6729819944d3c><23051dd559d1dc24aeb6729819944d3c>]

startxref 1714 %%EOFinserir a descrição da imagem aqui

SAÍDA:

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

/MediaBox [0.000 0.000 612.000 792.000]

endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (þÿdompdf <5113accd> + CPDF) /CreationDate (D:20171207123529+00'00') /ModDate (D:20171207123529+00'00') /Title (þÿRelatório de Pedidos)

endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 612.000 792.000] /Parent 3 0 R /Contents 7 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ�¨Ø°b�cËéƱ¢ùf�Ï�scÐ|�ó¤BÆ X¡QI�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè%h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding

endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding

endobj 11 0 obj << /Type /Font /Subtype /Type1 /Name /F4 /BaseFont /Helvetica /Encoding /WinAnsiEncoding

endobj xref 0 12 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000306 00000 n 0000000335 00000 n 0000000546 00000 n 0000000649 00000 n 0000001276 00000 n 0000001385 00000 n 0000001497 00000 n 0000001606 00000 n trailer << /Size 12 /Root 1 0 R /Info 5 0 R /ID[<23051dd559d1dc24aeb6729819944d3c><23051dd559d1dc24aeb6729819944d3c>]

startxref 1714 %%EOF

SAÍDA

inserir a descrição da imagem aqui

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿx���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ �¨Ø°b�cËéƱ¢ùf�Ï�s cÐ|�ó¤BÆ�ÜÛÊRW¶CÞ�¨Ø°b�cËéƱ¢ùf�Ï�scÐ|�ó¤BÆ X¡Q I�×ïp��X¡QI�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè% h�ô´µ¹��dpÜuú�þ´¶Àànîè%h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR 9æÖJè¢�BÝGŲ«�tèx³Ãl¨ÄlR9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��wJ��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ �¨Ø°b�cËéƱ¢ùf�Ï�s cÐ|�ó¤BÆ X¡Q I�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè% h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR 9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ�¨Ø°b�cËéƱ¢ùf�Ï�scÐ|�ó¤BÆ X¡QI�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè%h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

Fonte Link

PDF em Binário DOMPDF laravel

Estou com um problema no laravel ao montar um PDF. Ele dá a saída toda em binário. Estou sando o https://github.com/barryvdh/laravel-dompdf

Vejam o código:

      public function relatorio($id)
      {
        $pedidos_id = Pedidos::find($id);

        $pedidos['pedidos'] = Pedidos::select(
        'pedidos_id',
        'cliente_id',
        'pedidos.observacao',
        'pedidos.especificacoes',
        'pedidos.frete',
        'pedidos.data',
        'pedidos.numero_pedido',
        'pedidos.preco_ipi',
        'clientes.nome as nome_cliente',
        'clientes.endereco as endereco_cliente',
        'clientes.telefone as telefone_cliente',
        'clientes.email as email_cliente',
        'clientes.uf as estado_cliente',
        'fornecedores.nome as nome_fornecedor',
        'pedidos.total_m2',
        'pedidos.total_m3',
        'pedidos.total'
        )
        ->join('clientes','clientes_id', '=', 'cliente_id')
        ->join('fornecedores','fornecedores_id', '=', 'fornecedor_id')
        ->orderBy('pedidos.data')
        ->where('pedidos_id',$pedidos_id)->get();
        // dados do pedido
        if(!$pedidos)
        {
        return response()->json([
        'message'   => 'Nenhum pedido encontrado',
      ], 404);
    }

  $pdf = PDF::loadView('pedidos', $pedidos);
  return $pdf->download('relatorio.pdf');
  }

SAÍDA:

%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R /F4 11 0 R

/MediaBox [0.000 0.000 612.000 792.000]

endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (þÿdompdf <5113accd> + CPDF) /CreationDate (D:20171207123529+00'00') /ModDate (D:20171207123529+00'00') /Title (þÿRelatório de Pedidos)

endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 612.000 792.000] /Parent 3 0 R /Contents 7 0 R

endobj 7 0 obj << /Filter /FlateDecode /Length 555 >> stream x���ÍnÓP�÷y�Yt�Hd¸ÿ?ÙQ(� Ñ�Zl�.�ÜÛÊRW¶CÞ �¨Ø°b�cËéƱ¢ùf�Ï�s cÐ|�ó¤BÆ X¡Q I�×ïp��{�Ûá4.Óê©Èr®cÈB^�î ¹��dpÜuú�þ´¶Àànîè% h�ô´µ(¸­9:Íü\KR"Ü<�Q~'Æ8�ܹ½Ùó.NêÙ�z-I<«ë²¿õçy�­3�ÆÇ"�q]¥?Ų«�tèx³Ãl¨ÄlR 9æÖJè¢�BÝG{ï�;íºqÎP�eÇøMVÅI¢½¡_ß�l·[�ᄎ¨?z�Çù çE³� �u¯Ýo�ñmÏ¥AaH�"Ï­¨!VCÌ�WE�«Ù¨ rÆ�FéÑ0ßA~þ½BèD¤E.u²_Èchµïx]äaSµ Á�ôe�®«,¤!¶8ïÐHÛÃ}J��M�¶Ô�êvQ>ƲüS��w}X�WéVß[�eè¹8MýhR�kÔJ�¢fÃéYã�{�¯¬@/y|eÑIY��JÓR)ÏÑ3¹§�Ë�#�ì>[ì<yÑHÂ�w§FJÊ�ñ#¯æe,¾ßTB¦�t�� ü_j7sØ�:=õJû¹BÈÝ*�GIr9åÐ5îF§�k�ÎÀÂÚÒû¦,³uZÑÖÀ׸1äEíÓå/m6 endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding

endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding

endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding

endobj 11 0 obj << /Type /Font /Subtype /Type1 /Name /F4 /BaseFont /Helvetica /Encoding /WinAnsiEncoding

endobj xref 0 12 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000306 00000 n 0000000335 00000 n 0000000546 00000 n 0000000649 00000 n 0000001276 00000 n 0000001385 00000 n 0000001497 00000 n 0000001606 00000 n trailer << /Size 12 /Root 1 0 R /Info 5 0 R /ID[<23051dd559d1dc24aeb6729819944d3c><23051dd559d1dc24aeb6729819944d3c>]

startxref 1714 %%EOF