Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 2 Jahren, 7 Monaten
Letzter Beitrag:
vor 2 Jahren, 7 Monaten
Beteiligte Autoren:
Fabrice Harari, Ericus

[WB19]Printing PDF Buffer

Startbeitrag von Ericus am 13.07.2015 08:59

Morning

I have a screen where clients can log in to get their invoices. I have had some pointers in the past from Fabrice and JP and hopefully implemented all of this.

A page is opened with parameters picked up from the link I sent the client.

Through web services the page is populated with all the client's outstanding invoices.

The client click on the invoice/statement they want to reprint and through webservices I prepare the report and return the PDF file as a buffer. Well I thought I did.

In my webservice I just use a variable of type buffer and fill it with the pdf file created.

Then return this buffer to the client's browser but how do I get this buffer to print now?

FileDisplay looks for a file and I don't want the client anywhere near my server.

Stringdisplay looks like it offers possibility but nothing is printed.

Any ideas please?



Ericus Steyn

Antworten:

Hello Ericus,

there is no way to print directly from a webdev site (and that's a good thing, imagine the result if any site could just start printing in your office)

So the usual way to do what you want is to DISPLAY the pdf in another tab of your client browser (by changing the destination/target) and to let the user either save it or print it.

Best regards

von Fabrice Harari - am 13.07.2015 09:39
Hi Fabrice

That is exactly what I want to do - I just want to display the pdf file which is now returned as a buffer.

FileDisplay will only work for a file and I am returning a buffer variable.

Thanks


Ericus

von Ericus - am 13.07.2015 09:53
Hi again

in that case, just use string display with the pdf mime type

Best regards

von Fabrice Harari - am 13.07.2015 14:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.