Thumbnails not being generated for PDF files
Thumbnails not being generated for PDF files
Thumbnails not being generated for PDF files
Contact form 7 send product PDF after submit
Automatically add tag (first 4 characters) to uploaded media
You can hook into add_attachment and/or edit_attachment actions and carry out an update on your separate database with the appropriate info. In both cases the attachment ID seems to be the only argument but you can easily get_post or get_post_meta if you need anything else. Cheers!
I recommend this plugin all of the time even though I have no association whatsoever with the plugin or the author of it. It’s free and allows you to add custom upload fields and all kinds of goodies to your edit screens without touching code. It’s called Advanced Custom Fields. Some developers would frown upon … Read more
You can put this in your theme functions.php file, It will work in any browser ( I tested this since it uses an iframe) and auto embed .pdf files from the media tab when you click “insert into post”. You can alter the width and height parameters for the size when its added to the … Read more
I’d say you’re gonna need external assistance… Zend Framework https://stackoverflow.com/a/4520725 $pdf = Zend_Pdf::load($pdfPath); echo $pdf->properties[‘Title’] . “\n”; echo $pdf->properties[‘Author’] . “\n”; XMP PHP Toolkit https://stackoverflow.com/a/8862702 XMP Toolkit PHP Extension is a PHP module which includes the Adobe XMP Toolkit SDK. This PHP5 extension will provide classes and methods to manipulate XMP Metadatas from files like … Read more
Yes, this can be done in WordPress. Check out http://wp.tutsplus.com/tutorials/allow-users-to-submit-images-your-site/ for some code examples. You will have to modify the logic to suit your needs of course, but the above link should get you pointed in the right direction.
The only reliable cross browser solution is to embed the .pdf in a iframe. add_filter(‘media_send_to_editor’, ‘my_pdf_embed’, 20, 3); function my_pdf_embed($html, $id) { $attachment = get_post($id); //fetching attachment by $id passed through $mime_type = $attachment->post_mime_type; //getting the mime-type if ($mime_type == ‘application/pdf’) { //checking mime-type $src = wp_get_attachment_url( $id ); //change the size to your liking … Read more
Instead of attaching the attachments to body content. Pass it as separate parameter. Like the below one. @wp_mail($to, $subject, $msg, $headers,$mail_attachment); I guess it solves your problem.