Hi, thanks for the report.
Hotfix follows. I will update it in WP directory soon.
Thanks goes also here and here:
https://gist.github.com/2176359
https://wordpress.stackexchange.com/questions/77212/add-filter-media-send-to-editor-does-not-work-on-wp-3-5
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<?php
/*
Plugin Name: RV Embed PDF
Description: When you upload PDF and insert a link to it with the Add Media button, it will be automatically embedded in the page using Google Docs Viewer.
Author: Rong Vang Media
Author URI: https://www.rongvang.cz
Version: 1.1
*/
function rv_embedpdf($html, $id){
$attachment = get_post($id);
$mime_type = $attachment->post_mime_type;
$out = "";
if ($mime_type == 'application/pdf') {
$out .= '<iframe src="https://docs.google.com/gview?url='.$attachment->guid.'&embedded=true" style="width:100%; height:500px;" frameborder="0"></iframe>';
}
$out .= $html;
return $out;
}
add_filter ( 'media_send_to_editor', 'rv_embedpdf', 20, 3);