Jump to content

Recommended Posts

Posted
  On 7/14/2015 at 9:26 PM, Licensecart said:

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 :)

Posted
  On 7/14/2015 at 9:26 PM, Licensecart said:

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

Posted
  On 7/14/2015 at 11:40 PM, Jonathan said:

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

Posted

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 .

Posted

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.

Posted
  On 7/15/2015 at 8:59 PM, Paul said:

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.

  • 3 weeks later...
Posted

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.

Posted

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!

Posted
  On 8/6/2015 at 1:11 AM, Fantasma said:

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 .

Posted
  On 8/6/2015 at 1:28 AM, naja7host said:

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.

Posted
  On 8/6/2015 at 1:30 AM, Jonathan said:

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 ?

Posted

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?

Posted
  On 8/6/2015 at 2:59 AM, Fantasma said:

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 ;)

Posted

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 .

Posted
  On 8/7/2015 at 12:58 AM, naja7host said:

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.

Posted
  On 8/7/2015 at 12:58 AM, naja7host said:

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?

Posted
  On 8/14/2015 at 11:04 AM, Fantasma said:

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 .

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...