Coder Social home page Coder Social logo

bug about triangle-pos HOT 9 CLOSED

fahimanzamdip avatar fahimanzamdip commented on May 10, 2024
bug

from triangle-pos.

Comments (9)

FahimAnzamDip avatar FahimAnzamDip commented on May 10, 2024

Can you please write down the error message?

from triangle-pos.

sarmadmahar avatar sarmadmahar commented on May 10, 2024

no error is showing but PDF error in popup Failed to load PDF document.

from triangle-pos.

sarmadmahar avatar sarmadmahar commented on May 10, 2024

Simply replace this code inside of [ROOT_document]\triangle-pos-master\Modules\Sale\Routes\web.php

Route::get('/sales/pos/pdf/{id}', function ($id) {
        $sale = \Modules\Sale\Entities\Sale::findOrFail($id);
//        $pdf = \PDF::loadView('sale::print-pos', [
//            'sale' => $sale,
//        ])->setPaper('a7')
//            ->setOption('margin-top', 8)
//            ->setOption('margin-bottom', 8)
//            ->setOption('margin-left', 5)
//            ->setOption('margin-right', 5);
//
//        return $pdf->stream('sale-'. $sale->reference .'.pdf');
        $html=view('sale::print-pos',['sale'=>$sale]);
        $mpdf = new \Mpdf\Mpdf(['format' => [80, 150]]);
        $mpdf->WriteHTML($html);
        $mpdf->Output();
    })->name('sales.pos.pdf');

from triangle-pos.

FahimAnzamDip avatar FahimAnzamDip commented on May 10, 2024

It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.

from triangle-pos.

shimulckbt avatar shimulckbt commented on May 10, 2024

thank you!!

from triangle-pos.

shimulckbt avatar shimulckbt commented on May 10, 2024

from triangle-pos.

sarmadmahar avatar sarmadmahar commented on May 10, 2024

Yes I used it

from triangle-pos.

OBouysfi avatar OBouysfi commented on May 10, 2024

Illuminate\Contracts\Container\BindingResolutionException

Target class [CommandMakeCommand] does not exist.

on composer install

from triangle-pos.

FahimAnzamDip avatar FahimAnzamDip commented on May 10, 2024

PDF Generator in this project is Laravel Snappy.

from triangle-pos.

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.