<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Collin Mendons</title>
    <description>The latest articles on DEV Community by Collin Mendons (@iamcollin).</description>
    <link>https://dev.to/iamcollin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3772767%2F9d9e4c1e-d5c3-4b61-a23c-778cd524ce57.jpeg</url>
      <title>DEV Community: Collin Mendons</title>
      <link>https://dev.to/iamcollin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamcollin"/>
    <language>en</language>
    <item>
      <title>How to generate a PDF report automatically (and the step everyone skips)</title>
      <dc:creator>Collin Mendons</dc:creator>
      <pubDate>Fri, 26 Jun 2026 13:20:11 +0000</pubDate>
      <link>https://dev.to/iamcollin/how-to-generate-a-pdf-report-automatically-and-the-step-everyone-skips-3je4</link>
      <guid>https://dev.to/iamcollin/how-to-generate-a-pdf-report-automatically-and-the-step-everyone-skips-3je4</guid>
      <description>&lt;h2&gt;
  
  
  Answer block
&lt;/h2&gt;

&lt;p&gt;To generate a PDF report automatically you wire up three pieces: a data source, a template that defines the layout, and an engine that merges them on a trigger or schedule. You can do it in code (Python libraries like ReportLab or FPDF) or with no-code template APIs (CraftMyPDF, Adobe Document Generation) connected to an automation platform like Zapier, Make, or n8n.&lt;/p&gt;




&lt;p&gt;My first automated PDF report started life as a five-minute job. Marketing wanted the same weekly summary every Monday, a few tables and a chart, exported clean so it could go straight into a deck. Easy. I'd done harder things before lunch.&lt;/p&gt;

&lt;p&gt;The rendering part took an afternoon, like I expected. The data part took two weeks. And that gap, between the part that looks like the work and the part that actually is the work, is the thing almost every "how to generate a PDF report" tutorial gets backwards.&lt;/p&gt;

&lt;p&gt;So here's the honest version. The methods that work, when to reach for each, and the step that quietly eats most of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What generating a PDF report actually involves
&lt;/h2&gt;

&lt;p&gt;Three pieces have to come together. A data source that holds the numbers. A template that says where everything goes and how it looks. And a merge engine that pours one into the other and spits out a file.&lt;/p&gt;

&lt;p&gt;Most guides spend all their words on the third piece, because that's where the satisfying code lives. You call a function, a PDF appears, it feels like magic. The first two pieces are where the real work hides, and we'll get to why.&lt;/p&gt;

&lt;p&gt;For now, the merge engine. There are two honest ways to build it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: do it in code
&lt;/h2&gt;

&lt;p&gt;If you're already comfortable in a scripting language, generating the PDF yourself gives you the most control and costs nothing but your time.&lt;/p&gt;

&lt;p&gt;In Python, &lt;a href="https://docs.reportlab.com/" rel="noopener noreferrer"&gt;ReportLab&lt;/a&gt; is the heavyweight: full control over layout, fonts, tables, vector charts, the works. FPDF is the lighter option when you just need text and simple tables on a page. Pair either with pandas to shape the data and matplotlib to render charts as images you drop in, and you can produce something genuinely polished.&lt;/p&gt;

&lt;p&gt;If you want a concrete starting point, there's a solid walkthrough of the whole pattern in &lt;a href="https://towardsdatascience.com/how-to-create-pdf-reports-with-python-the-essential-guide-c08dd3ebf2ee/" rel="noopener noreferrer"&gt;this Towards Data Science guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The trade-off is maintenance. Every layout tweak is a code change, and "can we move the logo and add the regional breakdown" turns into a small ticket instead of a two-minute edit. Code is the right call when the report is stable, the volume is high, and you want it running on a server with nobody touching it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: a template plus an automation platform
&lt;/h2&gt;

&lt;p&gt;If you're not writing code, or you don't want the layout living inside a script, the cleaner path is a template API wired to an automation tool.&lt;/p&gt;

&lt;p&gt;The shape is simple. You design the report once in a visual editor, leaving placeholders for the values. A service like CraftMyPDF or &lt;a href="https://developer.adobe.com/document-services/use-cases/content-publishing/automated-report-generation/" rel="noopener noreferrer"&gt;Adobe's Document Generation API&lt;/a&gt; takes your template plus a chunk of JSON and returns a pixel-perfect PDF.&lt;/p&gt;

&lt;p&gt;Then you let an automation platform do the triggering. A new row lands in Airtable or Google Sheets, Zapier or Make or n8n grabs that row, sends it to the template service, and emails the finished report wherever it needs to go.&lt;/p&gt;

&lt;p&gt;The win here is that the design lives somewhere a non-developer can change it. When marketing wants the logo moved, they move it, and nobody opens a code editor. The cost is a monthly bill and a ceiling on how weird your layouts can get before the template editor fights you.&lt;/p&gt;

&lt;p&gt;For most teams that aren't engineering-heavy, this is the route I'd point you at first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The step every tutorial skips
&lt;/h2&gt;

&lt;p&gt;Here's what both options quietly assume: that your data already sits in a clean table somewhere, ready to be merged.&lt;/p&gt;

&lt;p&gt;Mine didn't. Half the numbers for that Monday report lived in places with no export button. A vendor dashboard that showed the figure on screen and offered no download. A supplier portal behind a login. A partner's analytics page that updated whenever they felt like it. Every week, before any template or script could run, somebody had to open six tabs and copy values into the spreadsheet by hand. That copying was the two weeks. The PDF generation was the afternoon.&lt;/p&gt;

&lt;p&gt;This is the part worth saying out loud, because it changes what you should automate first. If the data already flows into a database or a sheet through an API, pick either option above and you're done. If it doesn't, the report generator isn't your bottleneck. The gathering is. And gathering data off websites that were never built to share it is its own problem, separate from rendering a file.&lt;/p&gt;

&lt;p&gt;The tools that handle that last part are browser agents that read a page the way a person does, rather than relying on an API that doesn't exist. I work on one called &lt;a href="https://browzey.ai" rel="noopener noreferrer"&gt;an AI browser agent&lt;/a&gt;, so take the mention with the appropriate grain of salt, but the category matters here whichever tool you reach for: it's what turns "someone copies these numbers every Monday" into a step that runs on its own.&lt;/p&gt;

&lt;p&gt;If you want the longer version of why pulling data off a live site is a different problem from a normal export, I wrote up &lt;a href="https://browzey.ai/blog/web-scraping-vs-browser-automation" rel="noopener noreferrer"&gt;the line between scraping and driving a browser&lt;/a&gt; separately. The short of it is that one reads a feed and the other reads the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to pick, fast
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can code, the report is stable, volume is high → a Python library like ReportLab.&lt;/li&gt;
&lt;li&gt;You want non-developers to own the layout → a template API plus Zapier, Make, or n8n.&lt;/li&gt;
&lt;li&gt;Your data already lives in a sheet or database → either of the above, you're set.&lt;/li&gt;
&lt;li&gt;Your data is trapped on dashboards or portals with no export → fix the gathering step first, then generate the PDF.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The mistake I made, and the one I see most often, is treating the whole thing as a rendering problem. You spend your effort making a beautiful generator and still hand-feed it data forever. Sort out where the numbers come from before you fall in love with the template, and the weekly report stops being a weekly chore.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What's the easiest way to generate a PDF report from data?&lt;/strong&gt;&lt;br&gt;
For non-developers, a template service like CraftMyPDF or Adobe Document Generation connected to Zapier, Make, or n8n is the easiest. You design the layout once, and the automation fills it from a spreadsheet or database whenever new data arrives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I generate a PDF report in Python?&lt;/strong&gt;&lt;br&gt;
Use ReportLab for full control over layout and charts, or FPDF for simpler text-and-table reports. Shape your data with pandas first, render any charts as images, then place everything into the document and save it. You can run the script on a schedule with cron or a CI job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I automate PDF report generation without code?&lt;/strong&gt;&lt;br&gt;
Yes. Pair a no-code PDF template API with an automation platform. The platform watches a data source (like Airtable or Google Sheets), sends each new record to the template, and delivers the finished PDF by email or to storage, all without writing code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does my automated report still need manual work every week?&lt;/strong&gt;&lt;br&gt;
Usually because the data lives somewhere without an export, like a dashboard or a login-gated portal, so a human copies it into the spreadsheet before the report can run. Automating that data-gathering step, not the PDF rendering, is what removes the recurring manual work.&lt;/p&gt;

</description>
      <category>python</category>
      <category>automation</category>
      <category>pdf</category>
      <category>nocode</category>
    </item>
    <item>
      <title>Selenium vs Playwright in 2026 (and when the question is wrong)</title>
      <dc:creator>Collin Mendons</dc:creator>
      <pubDate>Sun, 21 Jun 2026 18:12:44 +0000</pubDate>
      <link>https://dev.to/iamcollin/selenium-vs-playwright-in-2026-and-when-the-question-is-wrong-3od0</link>
      <guid>https://dev.to/iamcollin/selenium-vs-playwright-in-2026-and-when-the-question-is-wrong-3od0</guid>
      <description>&lt;h2&gt;
  
  
  Answer block
&lt;/h2&gt;

&lt;p&gt;For most new browser automation projects in 2026, Playwright is the better default: it's faster, more reliable thanks to built-in auto-waiting, and has a smoother debugging experience than Selenium. Selenium is still the right pick when you need wider browser coverage (Edge legacy, older Safari), broader language bindings (Ruby, Kotlin), or you're maintaining an existing Selenium suite that would be expensive to migrate. If you're not a developer and just need to automate web work, neither is the right answer; an AI browser agent that reads the page and decides what to do is a better fit for that case.&lt;/p&gt;




&lt;p&gt;I've shipped browser automation on both. Years of Selenium at a previous job, then Playwright once it stopped being the new kid and started being the default. From inside the IDE the two read totally different.&lt;/p&gt;

&lt;p&gt;So when somebody asks me which one to pick in 2026, I have an answer. I also have a second answer, for the half of people asking the question who probably shouldn't be reaching for either.&lt;/p&gt;

&lt;p&gt;I'll give you the first answer up front. Then we'll talk about the other one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short verdict for developers
&lt;/h2&gt;

&lt;p&gt;If you're starting a new browser automation project today, default to Playwright. The architecture is better, the auto-waiting saves you from most of the flaky-test nightmares Selenium people complain about, and the debugging tools are years ahead. Unless one of these is true for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to support browsers Playwright doesn't (older Edge, weird embedded WebViews).&lt;/li&gt;
&lt;li&gt;Your team writes in Ruby or Kotlin and you don't want to switch.&lt;/li&gt;
&lt;li&gt;You already have 1,000+ Selenium tests and the migration cost is brutal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If none of those apply, Playwright. Move on.&lt;/p&gt;

&lt;p&gt;That's the verdict. Now the why.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture: WebDriver vs talking to the browser directly
&lt;/h2&gt;

&lt;p&gt;Selenium talks to the browser through WebDriver, which is a separate process the test runner sends HTTP requests to. Every action goes: test code, then WebDriver, then browser. That extra hop has been the source of basically every weird Selenium problem I've ever had. The driver gets out of sync. The driver crashes. The driver version doesn't match Chrome. You spend a Friday afternoon updating drivers.&lt;/p&gt;

&lt;p&gt;Playwright cuts the hop. It speaks the Chrome DevTools Protocol directly (and the equivalents for Firefox and WebKit). The test runner is in the same process as the controller. Fewer moving parts. Fewer ways to break.&lt;/p&gt;

&lt;p&gt;Doesn't sound like much on paper. In practice it's the difference between a green CI run and an angry Slack message at 2am.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Playwright is faster. Most honest &lt;a href="https://testdino.com/blog/performance-benchmarks/" rel="noopener noreferrer"&gt;benchmarks&lt;/a&gt; put it at roughly 2x Selenium on equivalent test suites. The biggest contributors are auto-wait (you stop sleeping unnecessarily) and the reduced HTTP round-trips from the architecture above.&lt;/p&gt;

&lt;p&gt;How much that matters depends on your suite. If you have 50 tests and they finish in 4 minutes, you don't care. If you have 5,000 tests and CI is the bottleneck of your release process, it adds up to hours. I've seen teams cut their CI budget in half by migrating.&lt;/p&gt;

&lt;p&gt;I wouldn't migrate just for the speed. I would migrate for the speed plus the reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reliability and auto-waits
&lt;/h2&gt;

&lt;p&gt;This is the one that actually changes day-to-day life on the team. In Selenium, you write &lt;code&gt;driver.find_element(...)&lt;/code&gt; and the element might not be there yet, so you sprinkle &lt;code&gt;WebDriverWait&lt;/code&gt; calls everywhere. New people on the team forget. The tests pass locally and fail on CI. You spend Tuesday investigating a flake that turns out to be a timing issue on a button that animates in.&lt;/p&gt;

&lt;p&gt;Playwright auto-waits. When you say &lt;code&gt;page.click("button#submit")&lt;/code&gt;, it waits for the element to exist, be visible, be enabled, and be stable. If it isn't, you get a clear timeout with a screenshot. No more &lt;code&gt;sleep(2)&lt;/code&gt; showing up in code reviews.&lt;/p&gt;

&lt;p&gt;There's a fair counterpoint. A &lt;a href="https://doi.org/10.9734/ajrcos/2025/v18i1546" rel="noopener noreferrer"&gt;2025 reliability study&lt;/a&gt; ran both for 24 hours and found Selenium hit 100% uptime while Playwright hit 99.72%. So Playwright isn't bulletproof, especially for very long-lived sessions. For a normal test suite, the auto-wait win still dwarfs that. For a 24/7 production scraper, weigh the number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser and language support
&lt;/h2&gt;

&lt;p&gt;This is where Selenium's age becomes an asset.&lt;/p&gt;

&lt;p&gt;Selenium has official drivers for Chrome, Firefox, Safari, Edge (including legacy IE-mode in some cases), and basically anything else with a WebDriver implementation. Playwright supports Chromium, Firefox, and WebKit out of the box. WebKit isn't Safari (it's the engine behind Safari), so if you have to verify exact Safari behavior on macOS or iOS, Selenium has a real edge.&lt;/p&gt;

&lt;p&gt;Language bindings are the same story. Selenium has official support for Java, C#, Python, Ruby, JavaScript, and Kotlin. Playwright officially supports JS/TS, Python, .NET, and Java. The Java and Python paths are solid on both. The Ruby and Kotlin teams have to either stay on Selenium or rely on unofficial bindings.&lt;/p&gt;

&lt;p&gt;For most teams in 2026 this won't matter. For some teams it's the only thing that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging and developer experience
&lt;/h2&gt;

&lt;p&gt;Debugging is where Selenium gets quietly beaten. Playwright ships with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A trace viewer that records every action with before/after DOM snapshots.&lt;/li&gt;
&lt;li&gt;A codegen tool that records your manual clicks into Playwright code.&lt;/li&gt;
&lt;li&gt;An inspector that pauses execution and lets you step through.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Selenium has none of this natively. There are third-party tools, but they're not the default and they don't compose as cleanly.&lt;/p&gt;

&lt;p&gt;The first time I caught a failing test in five minutes using Playwright's trace viewer, instead of the usual half-hour of &lt;code&gt;console.log&lt;/code&gt; archaeology, I stopped pretending the comparison was close.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now the second answer
&lt;/h2&gt;

&lt;p&gt;Both tools are powerful and both are aimed at the same person: a developer who is comfortable writing selectors and maintaining a test suite. That's a fine target. It's not the only person reaching for this comparison.&lt;/p&gt;

&lt;p&gt;Half the time someone asks me "should I use Selenium or Playwright," what they actually want is to automate something on the web (lead research, or repetitive form filling) and they aren't a developer. They Googled it, the comparison posts came back, and now they're stuck deciding between two things they can't really use.&lt;/p&gt;

&lt;p&gt;For that person, the answer is neither.&lt;/p&gt;

&lt;p&gt;The thing that's changed in the last two years is that AI browser agents can read a live page the way a person would, decide what to click, and do the job without selectors. No XPath, no CSS, no waiting strategy, no driver version drift. You describe the goal in plain English and the agent works the page. We built &lt;a href="https://browzey.ai" rel="noopener noreferrer"&gt;Browzey&lt;/a&gt; for exactly this audience: the operator or founder who needs the outcome and doesn't want to maintain test code to get it.&lt;/p&gt;

&lt;p&gt;When the site changes, selector-based approaches break and the agent usually doesn't, because it's reading semantic meaning instead of brittle CSS paths. That's the part the Selenium-vs-Playwright debate doesn't really capture. Both tools live in the same selector-driven world.&lt;/p&gt;

&lt;p&gt;If you're an engineer building a test suite for a product, Selenium vs Playwright is still your decision, and Playwright is usually the answer. If you're a founder trying to scrape leads off a directory or fill out the same web form 200 times, you're using the wrong family of tools. There's a &lt;a href="https://browzey.ai/blog/non-technical-founders-guide-to-browser-automation" rel="noopener noreferrer"&gt;whole different category&lt;/a&gt; of automation for you, and it doesn't start with "pip install selenium."&lt;/p&gt;

&lt;h2&gt;
  
  
  The cheat sheet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;New project, you can pick freely → Playwright.&lt;/li&gt;
&lt;li&gt;Heavy existing Selenium investment → stay, migrate slowly if at all.&lt;/li&gt;
&lt;li&gt;Need Safari-on-actual-Safari or Ruby/Kotlin → Selenium.&lt;/li&gt;
&lt;li&gt;You're a developer building tests → Playwright by default, Selenium for legacy reach.&lt;/li&gt;
&lt;li&gt;You're not a developer, you want the outcome → AI browser agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The mistake I see most often: someone reads a comparison post, picks the "winner," writes a hundred tests, then the app gets a redesign and half the tests break overnight. The selector-based approach is fundamentally fragile to UI change. You can mitigate it. You can't make it go away.&lt;/p&gt;

&lt;p&gt;Pick the layer that matches what you're actually trying to do. Test code is a fine layer for a product team. It's the wrong layer for a Tuesday afternoon scrape.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is Playwright better than Selenium in 2026?&lt;/strong&gt;&lt;br&gt;
For most new projects, yes. Playwright is faster, more reliable thanks to auto-waiting, and has a much better debugging story. Selenium is still better when you need to support legacy browsers (older Edge, IE-mode) or write tests in Ruby or Kotlin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use both Selenium and Playwright in the same project?&lt;/strong&gt;&lt;br&gt;
Yes, but you usually shouldn't. Each tool has its own driver, syntax, and waiting model. Mixing them inside one suite makes the codebase harder to maintain. The exception is a slow migration: keep Selenium for the legacy suite and write all new tests in Playwright until the old tests are gone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Playwright easier to learn than Selenium?&lt;/strong&gt;&lt;br&gt;
Most developers say yes. Playwright's auto-waiting removes a class of timing bugs Selenium beginners hit constantly, and the codegen tool lets you record clicks into starter code. Selenium has more tutorials online (because it's older), so the raw volume of learning material is higher.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which one is better for web scraping?&lt;/strong&gt;&lt;br&gt;
Playwright handles modern JavaScript-heavy sites better thanks to direct CDP access and built-in network interception. Selenium can scrape too, but the auto-wait absence makes it more prone to silent failures when content loads asynchronously. For a one-off scrape where you don't want to write code, neither tool is the right pick; an AI browser agent or a no-code scraper is faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Selenium have a future?&lt;/strong&gt;&lt;br&gt;
Yes. The Selenium project is still actively developed, browser-vendor support isn't going away, and millions of existing tests rely on it. New project momentum has shifted to Playwright, but Selenium isn't disappearing for a long time.&lt;/p&gt;

</description>
      <category>selenium</category>
      <category>playwright</category>
      <category>automation</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
