This is an archived forum post. The information may be outdated. Contact us if you have any questions.

PDF has active hyperlinks but text is invisible

cyrilg wrote on 2016-08-25:
I use node.js and the rest API to generate Pdf from HTML using the following code:

  var newpdf = {};
  newpdf.src = '<a href="">Google</a>';
  newpdf.username = 'cyrilg';
  newpdf.key = "635************************ba";
  var options = { 
    method: 'POST',
    url: '',
    headers:{ 'content-type': 'application/x-www-form-urlencoded' },
    form: newpdf 
  request(options,function (error, response, body){
    res.setHeader('Content-disposition', 'attachment; filename=file.pdf');
    res.setHeader('Content-type', 'application/pdf');
    res.charset = 'UTF-8';

The Pdf I get back from the API is totally blank but the hyperlinks seem to be active. If you hover on the top left corner of the pdf attached, there is an active link to Google and if you hover on the bottom right, you get the hyperlink to pdfcrowd as I use the parameter pdfcrowd_logo = true. The same problem occurs if I generate a pdf from a url.
Am I missing a parameter to display the text?

support wrote on 2016-08-30:

The problem seems to be caused by the fact that newpdf.src is not urlencoded.
Hope this helps.