Tema: pdf en php
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/10/2015, 12:02
jpalcaraz
 
Fecha de Ingreso: septiembre-2015
Mensajes: 6
Antigüedad: 8 años, 7 meses
Puntos: 0
Respuesta: pdf en php

si.en php tengo:
Código:
  if ($_POST[boton6]) {

   $file = './path/to/the.pdf';
$filename = 'ayuda.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);
  }
siendo boton 6 en html:
Código:
				<span>Ayuda general</span>
				<div class="button">
    <input type="submit" name="boton6"value="VER PDF">
</div> 
				<p>
        <img src="ayuda.png" align="left" height="135px" width="135px" />
					
				</p>
			</li>      
		</ul>
Gracias