AyRestaurant Posted January 5, 2011 Share Posted January 5, 2011 I want to add this button that says "save as pdf" but obviously dont want that button to appear on the pdf. So is there a way to only save like "parameters" of the page as a pdf document? Ex. Invoicebubble - when editing the invoice any coding ideas??? php, ajax, java??? Link to comment https://forums.phpfreaks.com/topic/223441-save-certain-parts-of-a-web-page-as-pdf/ Share on other sites More sharing options...
Psycho Posted January 5, 2011 Share Posted January 5, 2011 What are you using to convert the page to a PDF? If that process uses the "print" output of the page to generate the PDF then there is a simple solution. CSS allows you to specify different styles for elements based upon the "media". I have used this may times in the past to have elements such as the navigation section not display in the printed output (the navigation links have no purpose in a printed output). For any elements that you do not want in the printed output, give them a display property of none for the "print" media. Here is an old post where I provided some example code: http://www.phpfreaks.com/forums/javascript-help/print-function!/msg1093659/#msg1093659 Link to comment https://forums.phpfreaks.com/topic/223441-save-certain-parts-of-a-web-page-as-pdf/#findComment-1155056 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.