Jump to content

[SOLVED] Print php 2 pdf


emediastudios

Recommended Posts

I had some help on this site building a printer friendy file and it works great.

I wanted to know if there is a simple way to add two buttons to the bottom of the page.

1. print page. (i can do that one easily enough)

2. print to PDF ( this im not to sure about)

 

I know you can go to file-print-pdf, if you have acrobat installed.

But i wanted to know if i could eliminate that process and add a button instead.

Do i need to add a module to php to enable this? and change my php.ini file?

If so would i have to do the same again on my server? If so that would most likely be too much trouble.

 

I was told to add this to my page and i did

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="application/pdf" content="text/html; charset=utf-8" />

<title>Applications</title>

Link to comment
https://forums.phpfreaks.com/topic/76963-solved-print-php-2-pdf/
Share on other sites

What you would have to do would be generate that same page in PDF format (using the PDFLib module), then open that page in their browser. However, there's no way to print "directly to PDF". Printing really is just an image of the text. So you might be better just to offer a print.css so it prints out nicely.

The only reason to have PDF would be to pass around a digital copy once downloaded (or made available online).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.