PHP Classes

Blank screen

Recommend this page to a friend!

      Convert HTML to PDF PHP Library  >  All threads  >  Blank screen  >  (Un) Subscribe thread alerts  
Subject:Blank screen
Summary:config correct but not working
Messages:3
Author:Martina Mania
Date:2019-04-29 09:33:04
 

  1. Blank screen   Reply   Report abuse  
Picture of Martina Mania Martina Mania - 2019-04-29 09:33:04
Hi Dave
I know this is 3 years old, but it looks good to use now.

My api key is set and registered @ https://pdflayer.com/
The endpoint is set to default ...
private $endPoint = 'https://api.pdflayer.com/api/convert';
My secretKey is set and registered @ https://pdflayer.com/
Trying Example/basic:
<?php
/*
Basic instantiation and usage
*/
include('../html2pdf.class.php');
$h2pdf = new html2pdf();
//set the url to convert
$h2pdf->setParam('document_url','https://www.xxx.com.');
//start the conversion
$h2pdf->convertHTML();
//display the pdf file
$h2pdf->displayCapture();?>

Using remote server I get Blank page.
As far as i can tell configuration is fine..
any clues
regards emmdee


  2. Re: Blank screen   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2019-04-29 10:19:42 - In reply to message 1 from Martina Mania
Try downloading the pdf instead of displaying it and see if you get a valid file.

I am pretty sure that phpClasses also uses it to deliver their innovation award certificates. You may try adding a post in their help forum to find out if they are having any problems.

Dave

  3. Re: Blank screen   Reply   Report abuse  
Picture of Martina Mania Martina Mania - 2019-04-30 09:58:03 - In reply to message 2 from Dave Smith
Hi dave
Thanks for your response.
Basic.php and download.php work for me if the secret key is
omitted in the class.
I'm only interested in these two, so no probs.
cheers