Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/04/2026 in Posts

  1. Hi everyone, PagePdf is a ProcessWire module for generating PDF documents from pages using mPDF or Dompdf. Formerly this module was published as WirePDF. It has been renamed to PagePdf starting with version 3.0.0 to avoid confusion with the legacy WirePDF class bundled inside Pages2Pdf and to prevent accidental upgrade collisions. What it does Adds PDF generation methods to ProcessWire pages: $page->toPdf(['filename' => 'document.pdf']); You can also render PDF output as a string, save PDFs to disk, pass custom HTML, or render through a dedicated template file. Key features mPDF by default, Dompdf optional UTF-8 and Cyrillic support Configurable paper size, orientation, margins, font, and image DPI Headers and footers with {PAGENO}, {nbpg}, {DATE}, {sitename} Watermarks and PDF password protection Support for common ProcessWire fields and ProFields Setup wizard: Setup -> PagePdf Wizard Installation cd /site/modules git clone https://github.com/mxmsmnv/PagePdf.git PagePdf cd PagePdf composer install Then install PagePdf via Modules -> Refresh in the ProcessWire admin. Important note for Pages2Pdf users Do not install PagePdf as an in-place update for Pages2Pdf. It is a separate module. If you are using Pages2Pdf, install PagePdf separately, test PDF generation, and migrate templates/configuration deliberately. GitHub: https://github.com/mxmsmnv/PagePdf Feedback and bug reports are welcome.
    1 point
  2. Is "race" the only template that can be used for children of your page? If so you could instead use the name format to skip the Page Add step
    1 point
  3. Hey ProcessWire friends! @protro asked something about Strapi in another thread, so I did a quick research on how to build a basic frontend for content stored in Strapi and found this 20+ video on youtube: Now, don't get me wrong, Strapi is cool and all and the video is really great, but I couldn't help but chuckle thinking about how we do basically the same in ProcessWire. Here's our "epic" version: <?php foreach($pages->find('template=faq') as $faq) { echo "<div><h2>{$faq->question}</h2>{$faq->answer}</div>"; } Boom! Done in a few lines. No need for popcorn or a comfy chair. ? Cheers to simplicity and efficiency! ? #ProcessWireFTW #KeepItSimple #LessIsMore
    1 point
  4. If you prefer one-liners: <?php // https://processwire.com/api/ref/wire-array/each/ echo $pages->find('template=faq')->each("<div><h2>{question}</h2>{answer}</div>\n"); ?
    1 point
  5. Yes, it would for sure. I recall that Ryan was talking about making the PW API available through JS some years back. That would be exactly what we need. A RESTful API like the WP REST API in ProcessWire. This should ideally be available as an optional core module and support all Pro fields.
    1 point
  6. A little heads-up: WirePDF ≠ WirePDF I am in the process of upgrading a pretty old project, still running 3.0.240. I wanted everything up to date from ProcessWire to each and every module. So I was happy to see new version of WirePDF and went with it. Right after finishing the installation error messages showed up, Pages2Pdf broke and was messing with me, PDF generation threw errors, and so on. I started digging and found the problem: the listed update belongs to a totally new module called WirePDF (by @maximus) and has nothing to do with the file in the Pages2Pdf module folder. So there is a weird name collision and hijacking of the old module happening in the ProcessWire Upgrade (by @ryan) module right now.
    0 points
×
×
  • Create New...