1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5659 from beganovich/v5-1005-pdf-fullscreen

(v5) Quotes/invoices: Fix problem with full-screen view
This commit is contained in:
Benjamin Beganović 2021-05-10 13:35:48 +02:00 committed by GitHub
commit 0f2f6298a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -57,7 +57,7 @@ class InvoiceController extends Controller
];
if ($request->query('mode') === 'fullscreen') {
return response()->file($invoice->pdf_file_path(null, 'path'));
return render('invoices.show-fullscreen', $data);
}
return $this->render('invoices.show', $data);

View File

@ -44,7 +44,7 @@ class QuoteController extends Controller
];
if ($request->query('mode') === 'fullscreen') {
return response()->file($quote->pdf_file_path(null, 'path'));
return render('quotes.show-fullscreen', $data);
}
return $this->render('quotes.show', $data);
@ -76,9 +76,9 @@ class QuoteController extends Controller
}
if ($quotes->count() == 1) {
return response()->streamDownload(function () use ($invoices) {
echo file_get_contents($invoices->first()->pdf_file_path());
}, basename($invoices->first()->pdf_file_path()), ['Cache-Control:' => 'no-cache']);
return response()->streamDownload(function () use ($quotes) {
echo file_get_contents($quotes->first()->pdf_file_path());
}, basename($quotes->first()->pdf_file_path()), ['Cache-Control:' => 'no-cache']);
//return response()->download(TempFile::path($invoices->first()->pdf_file_path()), basename($quotes->first()->pdf_file_path()));
}

View File

@ -0,0 +1,2 @@
<iframe src="{{ $invoice->pdf_file_path() }}"
style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -0,0 +1,2 @@
<iframe src="{{ $quote->pdf_file_path() }}"
style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>