mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Stub PDF generator
This commit is contained in:
parent
c3674a8f4f
commit
58317f24e8
@ -182,14 +182,14 @@ class PreviewController extends BaseController
|
||||
return response()->json(['message' => 'This server cannot handle this request.'], 400);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$stub = new StubBuilder(auth()->user()->company(), auth()->user());
|
||||
$stub->setEntityType($request->entity_type)
|
||||
->setSettings($request->settings)
|
||||
->setSettingsType($request->settings_type);
|
||||
->setSettingsType($request->settings_type)
|
||||
->build();
|
||||
|
||||
|
||||
$pdf = $stub->build()->getPdf();
|
||||
$pdf = $stub->getPdf();
|
||||
|
||||
$response = Response::make($pdf, 200);
|
||||
$response->header('Content-Type', 'application/pdf');
|
||||
|
@ -195,7 +195,7 @@ class StubBuilder
|
||||
|
||||
$maker = new PdfMaker($state);
|
||||
|
||||
$this->html = $maker->design($design)
|
||||
$this->html = $maker->design($template)
|
||||
->build()
|
||||
->getCompiledHTML();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user