FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
How to take screenshots and generate PDFs in Elixir
How-ToWeb Development

How to take screenshots and generate PDFs in Elixir

via Dev.to WebdevCustodia-Admin1mo ago

How to Take Screenshots and Generate PDFs in Elixir Elixir has no native headless browser. Teams that need screenshots or PDFs typically shell out to a wkhtmltopdf binary, run a Node.js Puppeteer subprocess, or use chrome_remote_interface — a Chromium binding that requires a running Chrome instance. None of these are easy to supervise in an OTP application. Here's the simpler path: one HTTP call, binary response. Works in any Mix project or Phoenix endpoint. Using Req (recommended) Req is the modern Elixir HTTP client. Add it to mix.exs : defp deps do [ { :req , "~> 0.5" } ] end defmodule PageBolt do @base_url "https://pagebolt.dev/api/v1" defp api_key , do : System . fetch_env! ( "PAGEBOLT_API_KEY" ) def screenshot ( url ) do Req . post! ( " #{ @base_url } /screenshot" , headers: [{ "x-api-key" , api_key ()}], json: %{ url: url , fullPage: true , blockBanners: true } ) . body end def pdf_from_url ( url ) do Req . post! ( " #{ @base_url } /pdf" , headers: [{ "x-api-key" , api_key ()}],

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
28 views

Related Articles

Clean Code Principles Every Software Engineer Should Follow
How-To

Clean Code Principles Every Software Engineer Should Follow

Medium Programming • 4h ago

The Real Cost of Abstractions in .NET
How-To

The Real Cost of Abstractions in .NET

Medium Programming • 5h ago

Stop Learning Frameworks — You’re Wasting Your Time
How-To

Stop Learning Frameworks — You’re Wasting Your Time

Medium Programming • 6h ago

How to Self-Host n8n in 2026: VPS vs Managed Hosting (Full Comparison)
How-To

How to Self-Host n8n in 2026: VPS vs Managed Hosting (Full Comparison)

Dev.to • 6h ago

I Built a Mac App to Fix Android File Transfer — Here’s What I Learned
How-To

I Built a Mac App to Fix Android File Transfer — Here’s What I Learned

Medium Programming • 6h ago

Discover More Articles