<?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: Jeffrey Desenfans</title>
    <description>The latest articles on DEV Community by Jeffrey Desenfans (@jeffrey_desenfans_967111e).</description>
    <link>https://dev.to/jeffrey_desenfans_967111e</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%2F4065647%2F10f7cfa0-889d-4222-9545-c8ea76494695.jpg</url>
      <title>DEV Community: Jeffrey Desenfans</title>
      <link>https://dev.to/jeffrey_desenfans_967111e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeffrey_desenfans_967111e"/>
    <language>en</language>
    <item>
      <title>How I Built an Instant Vector Brand Guidelines Generator in Next.js</title>
      <dc:creator>Jeffrey Desenfans</dc:creator>
      <pubDate>Thu, 06 Aug 2026 09:57:12 +0000</pubDate>
      <link>https://dev.to/jeffrey_desenfans_967111e/how-i-built-an-instant-vector-brand-guidelines-generator-in-nextjs-4gid</link>
      <guid>https://dev.to/jeffrey_desenfans_967111e/how-i-built-an-instant-vector-brand-guidelines-generator-in-nextjs-4gid</guid>
      <description>&lt;p&gt;Creating brand guidelines manually is a tedious process for designers and developers alike. Setting up color palettes with exact CMYK/RGB values, typography scales, logo safety zones, and exporting print-ready vector PDFs takes hours of manual layout work in Adobe InDesign.&lt;/p&gt;

&lt;p&gt;To automate this, I built &lt;strong&gt;&lt;a href="https://www.brandguidemaker.com" rel="noopener noreferrer"&gt;BrandGuideMaker&lt;/a&gt;&lt;/strong&gt;—a web tool that programmatically compiles brand assets and design tokens into print-ready vector brand books instantly.&lt;/p&gt;

&lt;p&gt;Here is a breakdown of how the web application generates vector PDF documents dynamically on the fly.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Problem with Traditional PDF Generation
&lt;/h3&gt;

&lt;p&gt;Most web-based document tools generate PDFs by taking a DOM screenshot (HTML-to-Canvas to PNG) and wrapping it in a PDF container. &lt;/p&gt;

&lt;p&gt;This approach fails for professional print and design workflows because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text becomes rasterized&lt;/strong&gt; instead of remaining selectable vector typography.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vector graphics lose sharp scaling&lt;/strong&gt; and print clarity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Color spaces shift&lt;/strong&gt; because web canvases only render in RGB.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Tech Architecture &amp;amp; Solutions
&lt;/h3&gt;

&lt;p&gt;To deliver crisp vector brand books, the app separates the real-time preview from the vector compilation pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework:&lt;/strong&gt; Next.js (App Router)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live UI Engine:&lt;/strong&gt; React + Tailwind CSS with CSS Variables for instant live previews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vector PDF Compiler:&lt;/strong&gt; Dynamic SVG-to-PDF coordinate mapping using client-side PDF stream rendering.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  How Dynamic Color Token Conversion Works
&lt;/h3&gt;

&lt;p&gt;A key feature of automated brand books is generating multi-format color tokens (Hex, RGB, CMYK, HSL) from a single color picker input. &lt;/p&gt;

&lt;p&gt;Here is a simplified snippet of how the color token engine processes user inputs for both screen and commercial print specifications:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
// Color conversion helper for brand spec tables
function generateBrandColorTokens(hexColor) {
  // Strip hash and convert to RGB
  const hex = hexColor.replace('#', '');
  const r = parseInt(hex.substring(0, 2), 16) / 255;
  const g = parseInt(hex.substring(2, 4), 16) / 255;
  const b = parseInt(hex.substring(4, 6), 16) / 255;

  // Calculate CMYK values for print specs
  const k = 1 - Math.max(r, g, b);
  const c = k === 1 ? 0 : Math.round(((1 - r - k) / (1 - k)) * 100);
  const m = k === 1 ? 0 : Math.round(((1 - g - k) / (1 - k)) * 100);
  const y = k === 1 ? 0 : Math.round(((1 - b - k) / (1 - k)) * 100);

  return {
    hex: `#${hex.toUpperCase()}`,
    rgb: `rgb(${Math.round(r * 255)}, ${Math.round(g * 255)}, ${Math.round(b * 255)})`,
    cmyk: `C:${c}% M:${m}% Y:${y}% K:${Math.round(k * 100)}%`
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>design</category>
    </item>
    <item>
      <title>How I Built a 100% Client-Side PDF CMYK &amp; Bleed Checker with Next.js (Zero Server Uploads)</title>
      <dc:creator>Jeffrey Desenfans</dc:creator>
      <pubDate>Thu, 06 Aug 2026 09:55:58 +0000</pubDate>
      <link>https://dev.to/jeffrey_desenfans_967111e/how-i-built-a-100-client-side-pdf-cmyk-bleed-checker-with-nextjs-zero-server-uploads-1bp5</link>
      <guid>https://dev.to/jeffrey_desenfans_967111e/how-i-built-a-100-client-side-pdf-cmyk-bleed-checker-with-nextjs-zero-server-uploads-1bp5</guid>
      <description>&lt;p&gt;**When graphic designers prep files for commercial printing, they face a recurring nightmare: RGB color shifts, missing 3mm bleeds, and un-embedded fonts ruining a physical print run.&lt;/p&gt;

&lt;p&gt;Most preflight tools rely on expensive desktop suites like Adobe Acrobat Pro or online converters that force users to upload confidential client artwork to remote servers.&lt;/p&gt;

&lt;p&gt;I decided to solve this by building &lt;strong&gt;&lt;a href="https://www.pdfprintchecker.com" rel="noopener noreferrer"&gt;PDF Print Checker&lt;/a&gt;&lt;/strong&gt;—a lightweight Next.js web application that performs complete PDF inspection &lt;strong&gt;100% inside the user's browser&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is a breakdown of how the client-side architecture works and why handling binary PDF parsing in JavaScript is easier than it sounds.**&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1swn7mbx2e65ubhyc7jq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1swn7mbx2e65ubhyc7jq.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Process PDFs Entirely Client-Side?
&lt;/h3&gt;

&lt;p&gt;Moving heavy file processing from backend servers into the user's browser solves three major development hurdles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Infrastructure Costs:&lt;/strong&gt; Parsing 100MB+ vector files on Node servers burns memory and inflates AWS/Vercel serverless billings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% Privacy by Design:&lt;/strong&gt; Client artwork never leaves the browser local memory, eliminating GDPR and data compliance headaches.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant Speed:&lt;/strong&gt; Eliminating file upload latency gives users immediate feedback.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  The Technical Architecture
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework:&lt;/strong&gt; Next.js (App Router, static landing pages)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parsing Engine:&lt;/strong&gt; &lt;code&gt;pdfjs-dist&lt;/code&gt; (Mozilla's PDF.js library for low-level stream inspection)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling:&lt;/strong&gt; Tailwind CSS + Glassmorphism UI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting:&lt;/strong&gt; Vercel Edge&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Key Preflight Checks Implemented
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Color Space Extraction (CMYK vs. RGB)
&lt;/h4&gt;

&lt;p&gt;Rather than rasterizing the entire PDF into bitmap images, the app inspects the raw stream operators (&lt;code&gt;CS&lt;/code&gt;, &lt;code&gt;cs&lt;/code&gt;, &lt;code&gt;DeviceRGB&lt;/code&gt;, &lt;code&gt;DeviceCMYK&lt;/code&gt;, &lt;code&gt;ICCBased&lt;/code&gt;). This lets us catch vector shapes or raster assets using RGB profiles without melting the user's CPU.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Bleed Area Verification (MediaBox vs. TrimBox)
&lt;/h4&gt;

&lt;p&gt;PDF spec definitions rely on distinct page boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MediaBox&lt;/code&gt;: The physical page size.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TrimBox&lt;/code&gt;: The intended size of the finished printed product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By calculating the delta between the &lt;code&gt;MediaBox&lt;/code&gt; and &lt;code&gt;TrimBox&lt;/code&gt; coordinate arrays, we determine if the required &lt;strong&gt;3mm bleed margin&lt;/strong&gt; is present:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
// Extracting TrimBox vs MediaBox difference in points
const mediaBox = page.view; // [x1, y1, x2, y2]
const trimBox = page.trimBox || mediaBox;

const bleedLeftPoints = Math.abs(trimBox[0] - mediaBox[0]); 
const bleedLeftMm = bleedLeftPoints * 0.352778; // Convert points (1/72 inch) to mm

const hasValidBleed = bleedLeftMm &amp;gt;= 3.0;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
