![]() ![]() I want to create a PDF from a custom post typeĮg. The num parameter will be ignored for obvious reasons. In this case, don’t use the post_type parameter. Use &post_id=x with the ID of the post or custom post type you need, in your url. Generate New Version (might take several minutes) You can add a frontend link or button on your frontend and customize it, like in this example for Twitter Bootstrap:Ĭhange the parameters to suit your needs. How do I make a button or link for the frontend? You can also make the url into a link or button on your site, to use on frontend. In order to export a pdf, you can do it from backend from Tools -> PDF Export or enter in your browser. Libraries & CreditsįAQ I activated the plugin but can’t see any difference. Questions?Ĭheck the FAQ before opening new threads in the forum!Ĭontact me if you want a custom version of the plugin, for a fee (email on ). You can copy the plugin’s basic CSS from wp-content/plugins/simple-pdf-exporter/assets/pdf_export.css inside your current theme and edit it.ĭo not edit directly the plugin’s files pdf_layout.php and pdf_export.css, they will be overwritten with the next update. echo 'the content goes here' or it won’t show up in the PDF. You can copy the plugin’s basic structure from wp-content/plugins/simple-pdf-exporter/assets/pdf_layout.php inside your current theme and edit it. The PDF TemplateĬurrently, the template and design for the exported pdf, is very basic (and posts are rendered as a table, since floating doesn’t play nicely with the DOMPDF library). If you don’t use a custom url, hence you don’t add the post_type parameter to the url, the default post type exported will always be WP default post. This can’t be fixed, as PDF libraries are very resource-hungry.Īsk your hosting to check how many resources you would need to run the plugin and if there is anything you can do, within your hosting limits, to make sure the plugin has enough or appropriate RAM/PHP settings. If no PDF is generated you probably don’t have enough server resources. Since the PDF generation uses up a lot of resources, this will prevent too many runs of the plugin and the crashing of your server.Ĭheck the example below or the FAQ for ways to force the PDF generation anyway.ĭepending on how many posts you have, it might take from a few seconds to several minutes for a new PDF to be generated. The plugin checks if a pdf already exists with the same date (ddMonyear), if yes, the existing pdf will be served, otherwise a new will be generated. The PDF layout/design is VERY basic and will require html/css/php technical knowledge to customize. This plugin is NOT recommended for people with no tech knowledge. IMPORTANT This plugin requires at least 512MB of free RAM available, or it will timeout / return an error. You can also export a single post, or the exact number you need. Export a single PDF with all posts, or custom post types. ![]()
0 Comments
Leave a Reply. |