Saltar navegación

[Resuelto] We need to create a PDF from the single property page

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

For a real estate website, each property page needs to offer a PDF download that auto-generates using the page content.

Is it possible to implement it in Toolset?

Solution:

Toolset doesn't provide this functionality. One approach is to create a link to print the page using a CSS code snippet for print media, which strips down the page to essential content. Additionally, you can add JavaScript to trigger the print preview of the browser. Another option is to explore WordPress plugins that support PDF generation from page content.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Christopher Amirian 1 year, 8 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#2691454

This will be a real estate website where we will add some properties.
We need for each property to allow the users to download a PDF that autogenerates using the page content.

How can this be achieved?

Thanks,

Franco

#2691456

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi Franco,

Toolset does not have such a functionality.

One simple way to create a link to print the same page is to add a CSS code for print media.

You can use that CSS code to remove extra stuff of the page and only have a white background with text when printing:

 <link rel="stylesheet" href="print.css" type="text/css" media="print"> 
 

Then you can add a normal link to your view but with additional Javascript code to trigger the print preview of the browser:

<a href="#" id="print-button" onclick="window.print();return false;">Print this page</a> 

Most current browser have the option to print as PDF which will show that stripped down CSS version of the page.

I also did a quick Google search that might help you consider using other plugins that support such functionality:

enlace oculto

Thank you.