0

I am using Angular 5.0 and the FPDF Library (www.fpdf.org) for creating PDF documents in PHP code.

I have used this library in JavaScript with no problems, however with Angular, which the marketing people say is a superset of JavaScript, the PHP code I create to format a PDF produces nothing.

I can run this PHP code directly from the browser, and it works perfectly, so there is nothing wrong with the PHP.

I have even tried calling the PDF formatter from another PHP (include 'test_pdf.php') and it does not work. It seems to know that it is being called from Angular, and will not allow the FPDF Library to do it's work.

How do I pass a parameter to, and call the PHP code which uses the FPDF Library?

Thanks for your assistance.

Brian Fleming
  • 63
  • 1
  • 6
  • I have confirmed that the PDF php code is being called properly, and that it is receiving the single parameter which I am sending it, and the error_log on the server is empty (not created), so I am confident there are no syntax errors in the php code, however, it is not displaying the PDF preview on the monitor so that the user can view or print the PDF. How do I get the PDF previewer to display? – Brian Fleming Jun 18 '18 at 03:48
  • This is the error message I am receiving on the console: HttpErrorResponse {headers: HttpHeaders, status: 200, statusText: "OK", url: "http://huckleberrypp.com/angular/php/statusrpt.php?id=666", ok: false, …} – Brian Fleming Jun 18 '18 at 03:50
  • Just remembered that the PDF can be directed to a file, and I can confirm that it is saved, and that the parameter being passed is correct. So the question remains, how does the PDF viewer (if that is the correct expression) get called so that the file can be viewed? – Brian Fleming Jun 18 '18 at 05:14

0 Answers0