Squidix Web Hosting Posted July 14, 2015 Report Posted July 14, 2015 Having these things force download is a huge pain. This has been discussed - http://www.blesta.com/forums/index.php?/topic/1131-view-pdf-invoices-from-within-browser/ Cody suggested a setting to accommodate the fact that this may cause issues with some browsers. Darin and Rodrigo 2 Quote
Michael Posted July 14, 2015 Report Posted July 14, 2015 Again not a feature request you can do it if the browser supports it. Search the forum. Quote
PauloV Posted July 14, 2015 Report Posted July 14, 2015 Again not a feature request you can do it if the browser supports it. Search the forum. Not really, you have to code in the headers to not send the header to download/stream/transfer, and insted open, to show in the browser Its very easy to implement, for now its not a mandatory feature, but its a feature request, that I also like it Quote
Jonathan Posted July 14, 2015 Report Posted July 14, 2015 Again not a feature request you can do it if the browser supports it. Search the forum. This is very much a feature request. An in-browser PDF viewer is not a solution to this. +1 Quote
Michael Posted July 15, 2015 Report Posted July 15, 2015 This is very much a feature request. An in-browser PDF viewer is not a solution to this. +1 I don't use a PDF viewer plugin, I just open it on Safari. Chrome doesn't work for me but like I said it's a browser to Browser unless you use Naja7Host's Html one Quote
activa Posted July 15, 2015 Report Posted July 15, 2015 For this , i use HTML template component for invoices from Naja7host, it do the trick , the clients can view thier invoices from the prowser then they can download it in PDF format within the same page . excelent component . PauloV 1 Quote
Blesta Addons Posted July 15, 2015 Report Posted July 15, 2015 This is very much a feature request. An in-browser PDF viewer is not a solution to this. +1 Have you tested my HTML component for invoices? It do the jobs PauloV 1 Quote
Paul Posted July 15, 2015 Report Posted July 15, 2015 You can't reliably force the display of a PDF invoice in the browser. Some browsers will not know what to do with the PDF and prompt you to download it instead. Rather, I think the better solution is to have an HTML version of the invoice that can be viewed in the interface. Then you'd have the option "View" and "Download".. view displays the HTML invoice and perhaps allows you to pay, or links to make payment, and download sends the PDF version as it does now. We have a discussion going about this, but we welcome feedback on the details of how this should look. Kangaroo 1 Quote
Squidix Web Hosting Posted July 15, 2015 Author Report Posted July 15, 2015 You can't reliably force the display of a PDF invoice in the browser. Some browsers will not know what to do with the PDF and prompt you to download it instead. Rather, I think the better solution is to have an HTML version of the invoice that can be viewed in the interface. Then you'd have the option "View" and "Download".. view displays the HTML invoice and perhaps allows you to pay, or links to make payment, and download sends the PDF version as it does now. We have a discussion going about this, but we welcome feedback on the details of how this should look. That was actually my first instinct but I figured that'd be more work than just having a setting to show the PDF. Quote
kikloo Posted August 5, 2015 Report Posted August 5, 2015 yes it needs html. no need to view pdf etc. pdf should only for downloading or sending via email. Quote
Max Posted August 5, 2015 Report Posted August 5, 2015 Would be nice if the HTML invoices looked the same as the PDF ones though. Perhaps consider replacing tcpdf with a HTML to PDF convertor like dompdf. Quote
Fantasma Posted August 6, 2015 Report Posted August 6, 2015 I don't know how serious the problem of "some browsers" not knowing what to do with it actually is. Ubersmith has in-browser PDF loading and NOT ONE TIME SINCE 2004 have I ever had a problem with a staff member or customer having an issue with it! Not once! Since 2004! Seriously! Quote
Blesta Addons Posted August 6, 2015 Report Posted August 6, 2015 I don't know how serious the problem of "some browsers" not knowing what to do with it actually is. Ubersmith has in-browser PDF loading and NOT ONE TIME SINCE 2004 have I ever had a problem with a staff member or customer having an issue with it! Not once! Since 2004! Seriously! for my opinion is not priority , what i see here the blocker is the attachement pdf in the email , maybe if they force to shew it in the browser it can has a efect to attached pdf in emails . the suggestion is to ad a html preview , for this i have a html invoice componnts that can be used until the staff can release thier own system . Quote
Jonathan Posted August 6, 2015 Report Posted August 6, 2015 for my opinion is not priority , what i see here the blocker is the attachement pdf in the email , maybe if they force to shew it in the browser it can has a efect to attached pdf in emails . the suggestion is to ad a html preview , for this i have a html invoice componnts that can be used until the staff can release thier own system . Tested yours in a dev environment and it wreaks havok on invoice reminders. Quote
Blesta Addons Posted August 6, 2015 Report Posted August 6, 2015 Tested yours in a dev environment and it wreaks havok on invoice reminders. i will happy if you can provide more detail that i can fix it ... what step to produce the error ? Quote
Fantasma Posted August 6, 2015 Report Posted August 6, 2015 And the reason that a simple option of "Enable In-Browser PDF Loading?" YES or NO Cant just be added in a few minutes and satisfy those who are this adamant about wanting/requiring this feature, is.... what exactly?? *MIND BLOWN* How about I pitch in a $100 USD towards "sponsored development" of this feature and we get it added to the very next Blesta patch/update? Quote
Blesta Addons Posted August 7, 2015 Report Posted August 7, 2015 And the reason that a simple option of "Enable In-Browser PDF Loading?" YES or NO Cant just be added in a few minutes and satisfy those who are this adamant about wanting/requiring this feature, is.... what exactly?? *MIND BLOWN* How about I pitch in a $100 USD towards "sponsored development" of this feature and we get it added to the very next Blesta patch/update? i give you the solution for $0 . open components/invoice_delivery/invoice_delivery.php change this function public function downloadInvoices(array $invoice_ids, array $options = null) { $invoices = $this->getInvoices($invoice_ids, true); $this->buildInvoices($invoices, true, $options)->download(); } to public function downloadInvoices(array $invoice_ids, array $options = null) { $invoices = $this->getInvoices($invoice_ids, true); $this->buildInvoices($invoices, true, $options)->stream(); } test and give me feedback Quote
Blesta Addons Posted August 7, 2015 Report Posted August 7, 2015 More sophistical solution to avoid invoice attachment in email probleme open app/controllers/client_invoices.php if view function change $this->InvoiceDelivery->downloadInvoices(array($invoice->id)); to $this->InvoiceDelivery->streamInvoices(array($invoice->id)); in components/invoice_delivery/invoice_delivery.php under downloadInvoices() add the fallowing function public function streamInvoices(array $invoice_ids, array $options = null) { $invoices = $this->getInvoices($invoice_ids, true); $this->buildInvoices($invoices, true, $options)->stream(); } this will save the email attachement invoice in pdf . Fantasma and mrzell 2 Quote
Fantasma Posted August 12, 2015 Report Posted August 12, 2015 More sophistical solution to avoid invoice attachment in email probleme open app/controllers/client_invoices.php if view function change $this->InvoiceDelivery->downloadInvoices(array($invoice->id)); to $this->InvoiceDelivery->streamInvoices(array($invoice->id)); in components/invoice_delivery/invoice_delivery.php under downloadInvoices() add the fallowing function public function streamInvoices(array $invoice_ids, array $options = null) { $invoices = $this->getInvoices($invoice_ids, true); $this->buildInvoices($invoices, true, $options)->stream(); } this will save the email attachement invoice in pdf . Thanks! I'll be trying this out and keeping a record of the change so it can be re-implemented after each Blesta update that breaks it. Quote
Fantasma Posted August 13, 2015 Report Posted August 13, 2015 Have not had time to deal with Blesta customization's yet, but will ASAP. Quote
Fantasma Posted August 14, 2015 Report Posted August 14, 2015 More sophistical solution to avoid invoice attachment in email probleme open app/controllers/client_invoices.php if view function change $this->InvoiceDelivery->downloadInvoices(array($invoice->id)); to $this->InvoiceDelivery->streamInvoices(array($invoice->id)); in components/invoice_delivery/invoice_delivery.php under downloadInvoices() add the fallowing function public function streamInvoices(array $invoice_ids, array $options = null) { $invoices = $this->getInvoices($invoice_ids, true); $this->buildInvoices($invoices, true, $options)->stream(); } this will save the email attachement invoice in pdf . OK, i just implemented this and when I click View invoice now it loads a blank white page -- both on FireFox and Chrome... Any ideas? Quote
activa Posted August 17, 2015 Report Posted August 17, 2015 i have tested it now, it working like a charm Quote
Blesta Addons Posted August 17, 2015 Report Posted August 17, 2015 OK, i just implemented this and when I click View invoice now it loads a blank white page -- both on FireFox and Chrome... Any ideas? tested by me and is working . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.