Open all PDF or docx link as iframe

You can use the plugin vanilla-pdf-embed. If the PDF is in your WordPress media library, it will be embedded with the default settings in all the posts where it is written. If isn’t in the media library then use the [pdf]…[/pdf] shorttag: [pdf]http://domain.com/2012-04/item-1335086631.pdf[/pdf]

Print Cforms form as pdf

With help from a dev at WordPress Questions I got this solved. In wp-content/plugins/cforms/cforms.php we added require_once(dirname(__FILE__) . ‘/html2pdf/html2pdf.class.php’); which loaded all the necessary data from the folder html2pdf which has all the files based on code from html2pdf.fr Further in the same file after $newcontent .= substr($content,$last); we have code to pdfy the code: … Read more

How To: Simple domPDF Example

Seems as though I was attempting to perform this PDF creation too late in the lifecycle of the page. After adding this snippet to an action binding to init, it works perfectly.

Search through documents folder

get_bloginfo(‘template_directory’) returns a URI and I believe glob works with paths so try: $dir = get_theme_root() . “/documents/*”; foreach(glob($dir) as $file) { echo $file; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)