Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Single Product Share
- *
- * Sharing plugins can hook into here or you can add your own code directly.
- *
- * This template can be overridden by copying it to yourtheme/woocommerce/single-product/share.php.
- *
- * HOWEVER, on occasion WooCommerce will need to update template files and you
- * (the theme developer) will need to copy the new files to your theme to
- * maintain compatibility. We try to do this as little as possible, but it does
- * happen. When this occurs the version of the template file will be bumped and
- * the readme will list any important changes.
- *
- * @see https://docs.woocommerce.com/document/template-structure/
- * @package WooCommerce/Templates
- * @version 3.5.0
- */
- if ( ! defined( 'ABSPATH' ) ) {
- exit; // Exit if accessed directly.
- }
- do_action( 'woocommerce_share' ); // Sharing plugins can hook into here.
- /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
- ?>
- <?php
- echo "
- <script src='pdfmake.min.js'></script>
- <script src='vfs_fonts.js'></script>
- <script type='text/javascript'>
- function myFunction()
- {
- var dd = {
- pageSize: 'A4',
- content: [
- /*{
- image: '',
- width: 120
- },*/
- {
- text: 'Titulo del producto',
- style: 'titulo'
- },
- {
- columns: [
- {
- style: 'marginSuperior',
- width: '50%',
- aligment: 'justify',
- text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Malit profecta versatur nomine ocurreret multavit, officiis viveremus aeternum superstitio suspicor alia nostram, quando nostros congressus susceperant concederetur leguntur iam, vigiliae democritea tantopere causae, atilii plerumque ipsas potitur pertineant multis rem quaeri pro, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
- },
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'subtitulos',
- width: '50%',
- aligment: 'justify',
- text: 'Modo de empleo'},
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'textos',
- width: '50%',
- aligment: 'justify',
- text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Malit profecta versatur nomine ocurreret multavit, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
- }/*,
- {
- width: 260,
- image: ''
- }*/
- ]
- },
- {
- columns: [
- {
- style: 'subtitulos',
- width: '50%',
- aligment: 'justify',
- text: 'Principios Activos'},
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'textos',
- width: '50%',
- aligment: 'justify',
- text: 'quando nostros congressus susceperant concederetur leguntur iam, vigiliae democritea tantopere causae, atilii plerumque ipsas potitur pertineant multis rem quaeri pro, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
- },
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'subtitulos',
- width: '50%',
- aligment: 'justify',
- text: 'Ingredientes'},
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'textos',
- width: '50%',
- aligment: 'justify',
- text: 'praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
- },
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'subtitulos',
- width: '50%',
- aligment: 'justify',
- text: 'Formato'},
- {
- width: '40%',
- text: ''
- }
- ]
- },
- {
- columns: [
- {
- style: 'textos',
- width: '50%',
- aligment: 'justify',
- text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
- },
- {
- width: '40%',
- text: ''
- }
- ]
- }
- ],
- styles: {
- titulo: {
- marginTop: 10,
- fontSize: 22,
- bold:true
- },
- marginSuperior: {
- marginTop: 20,
- fontSize:10
- },
- subtitulos: {
- margin: 10,
- bold: true,
- fontSize: 12
- },
- textos: {
- fontSize: 10,
- }
- }
- }
- pdfMake.createPdf(dd).download('Report.pdf');
- }
- </script>";
- ?>
- <button type="button" onclick="myFunction()">DESCARGAR FICHA TECNICA</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement