How to color meta tags in PDF?

Asked

Viewed 42 times

0

I have some links to PDF’s on my website and I checked that on google the information does not appear correct.

So the question is: Can I set the meta description and title in PDF?

With some search instead of directly showing the link to CertificadoQAmadeuAntunes.pdf I started by changing to CertificadoQAmadeuAntunes.php and put the following code:

<?php
$file = './CertificadoQAmadeuAntunes.pdf';
$filename = 'CertificadoQAmadeuAntunes.pdf'; 
/* Note: Always use .pdf at the end. */

header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($file));
header('Accept-Ranges: bytes');

@readfile($file);
?>

Now I wanted to put the tags "title" "description" and "Keywords".

1 answer

0


I blocked the PDF on roboots.txt

I created another file .php

And I put the following code:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Certificado de Qualificações 12º ano - Amadeu Antunes</title>
<meta name="description" content="Certificado de Qualificações 12º ano e Certifiação Profissional em Técnico de Informática-Sistemas Amadeu Antunes">
<style type="text/css">
html, body {
margin: 0;
padding: 0;
border: 0;

height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0
}
</style>
</head>

<body>

  <iframe src="CertificadoQAmadeuAntunes.pdf"></iframe>

</body>
</html>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.