How can I add custom sizes for PDF thumbnails generation?

We have the fallback_intermediate_image_sizes filter within wp_generate_attachment_metadata(): ** * Filters the image sizes generated for non-image mime types. * * @since 4.7.0 * * @param string[] $fallback_sizes An array of image size names. * @param array $metadata Current attachment metadata. */ $fallback_sizes = apply_filters( ‘fallback_intermediate_image_sizes’, $fallback_sizes, $metadata ); where the default sizes are: $fallback_sizes = … Read more

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