<?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: Pocket PDF</title>
    <description>The latest articles on DEV Community by Pocket PDF (@pocketpdf).</description>
    <link>https://dev.to/pocketpdf</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%2F4245792%2F0eeaedb0-e235-499c-a8e8-9cc837ff1aa6.png</url>
      <title>DEV Community: Pocket PDF</title>
      <link>https://dev.to/pocketpdf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pocketpdf"/>
    <language>en</language>
    <item>
      <title>What in-browser PDF processing can and cannot do</title>
      <dc:creator>Pocket PDF</dc:creator>
      <pubDate>Sun, 15 Nov 2026 13:22:47 +0000</pubDate>
      <link>https://dev.to/pocketpdf/what-in-browser-pdf-processing-can-and-cannot-do-4d4l</link>
      <guid>https://dev.to/pocketpdf/what-in-browser-pdf-processing-can-and-cannot-do-4d4l</guid>
      <description>&lt;p&gt;There is a lot you can do with PDF files using JavaScript without uploading them to a server.&lt;/p&gt;

&lt;p&gt;There are also things that sound simple but become surprisingly difficult when you try to implement them entirely in a browser.&lt;/p&gt;

&lt;p&gt;While building PocketPDF, I ended up drawing a fairly clear line between operations that work well client-side and operations where the limitations become noticeable.&lt;/p&gt;

&lt;p&gt;Operations that work well in the browser&lt;/p&gt;

&lt;p&gt;The basic PDF operations are genuinely suitable for client-side processing.&lt;/p&gt;

&lt;p&gt;Merging combines pages from multiple documents into one PDF. Splitting extracts selected pages or separates a document into individual files.&lt;/p&gt;

&lt;p&gt;Rotating and reordering pages are also straightforward compared with more advanced document conversion.&lt;/p&gt;

&lt;p&gt;Watermarks and page numbers can be added by drawing text or other content onto PDF pages.&lt;/p&gt;

&lt;p&gt;Metadata editing and text extraction are similarly reasonable browser tasks.&lt;/p&gt;

&lt;p&gt;These operations don't generally require a remote server. The browser can read the input files, process them locally, and generate the output.&lt;/p&gt;

&lt;p&gt;Compression is more complicated&lt;/p&gt;

&lt;p&gt;PDF compression sounds like one operation, but the actual work depends heavily on the document.&lt;/p&gt;

&lt;p&gt;A PDF containing mostly text and vector graphics behaves differently from one containing hundreds of high-resolution photographs.&lt;/p&gt;

&lt;p&gt;Image-heavy PDFs can consume a lot of memory during processing.&lt;/p&gt;

&lt;p&gt;If images need to be decoded, resized, or re-encoded, the browser has to handle those operations while keeping the original document and intermediate data available.&lt;/p&gt;

&lt;p&gt;On a large document, that can become slow and memory hungry.&lt;/p&gt;

&lt;p&gt;I don't want to pretend that every PDF will shrink dramatically or that compression will be instant.&lt;/p&gt;

&lt;p&gt;OCR needs a model download&lt;/p&gt;

&lt;p&gt;OCR is another operation that requires more than a small JavaScript function.&lt;/p&gt;

&lt;p&gt;I use Tesseract compiled to WebAssembly.&lt;/p&gt;

&lt;p&gt;The engine is served from my own static files, and the required model data is downloaded before recognition can happen.&lt;/p&gt;

&lt;p&gt;Once the necessary files are available, OCR runs locally in the browser.&lt;/p&gt;

&lt;p&gt;The first use has a download cost, and processing speed depends on the device and document quality.&lt;/p&gt;

&lt;p&gt;That is a reasonable trade-off for keeping the actual document processing client-side.&lt;/p&gt;

&lt;p&gt;PDF to Word is where the limitations become obvious&lt;/p&gt;

&lt;p&gt;Extracting text from a PDF is not the same as reconstructing an editable Word document.&lt;/p&gt;

&lt;p&gt;A PDF stores positioned content. It doesn't necessarily contain the original paragraphs, tables, columns, and layout structure that existed in the source document.&lt;/p&gt;

&lt;p&gt;A converter can extract text, but preserving the original layout is much harder.&lt;/p&gt;

&lt;p&gt;Getting a document that looks identical in Word requires reconstructing relationships between text blocks, images, tables, and page elements.&lt;/p&gt;

&lt;p&gt;This is the area where a proper desktop application still has a significant advantage.&lt;/p&gt;

&lt;p&gt;I would rather be honest about that limitation than claim perfect PDF-to-Word conversion.&lt;/p&gt;

&lt;p&gt;Background removal without AI&lt;/p&gt;

&lt;p&gt;My background remover uses a plain edge-flood algorithm.&lt;/p&gt;

&lt;p&gt;It starts from the image edges and identifies connected areas that match the background characteristics. Those areas can then be made transparent.&lt;/p&gt;

&lt;p&gt;This works reasonably well for images with solid or relatively uniform backgrounds.&lt;/p&gt;

&lt;p&gt;It doesn't perform well on complex backgrounds, detailed hair, similar foreground and background colours, or objects with complicated edges.&lt;/p&gt;

&lt;p&gt;That limitation is deliberate.&lt;/p&gt;

&lt;p&gt;A more capable AI background remover would require a model and, depending on how it is deployed, significant processing resources. Running that kind of model locally would also introduce a much larger download and performance cost.&lt;/p&gt;

&lt;p&gt;I chose a smaller algorithm that works in the browser without sending the image to a server.&lt;/p&gt;

&lt;p&gt;The practical distinction&lt;/p&gt;

&lt;p&gt;For me, the important question isn't whether a feature can technically run in JavaScript.&lt;/p&gt;

&lt;p&gt;It's whether the browser can run it reliably, with reasonable memory usage and an output that is actually useful.&lt;/p&gt;

&lt;p&gt;Merging, splitting, rotating, reordering, adding watermarks, editing metadata, and extracting text are good examples of operations that fit naturally into a browser-based tool.&lt;/p&gt;

&lt;p&gt;Large-scale document reconstruction and complex image processing are different problems.&lt;/p&gt;

&lt;p&gt;I build the tools around what can be done well locally, rather than pretending every operation has no limitations.&lt;/p&gt;

&lt;p&gt;You can try the tools at &lt;a href="https://pocketpdf.site" rel="noopener noreferrer"&gt;https://pocketpdf.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Embedding fonts is the difference between a converted document and a broken one</title>
      <dc:creator>Pocket PDF</dc:creator>
      <pubDate>Sun, 15 Nov 2026 13:18:55 +0000</pubDate>
      <link>https://dev.to/pocketpdf/embedding-fonts-is-the-difference-between-a-converted-document-and-a-broken-one-99l</link>
      <guid>https://dev.to/pocketpdf/embedding-fonts-is-the-difference-between-a-converted-document-and-a-broken-one-99l</guid>
      <description>&lt;p&gt;One thing I learned while working on document conversion is that extracting text is only half the job.&lt;/p&gt;

&lt;p&gt;You can successfully read every character from an EPUB, generate a PDF, and still produce a document that looks completely broken.&lt;/p&gt;

&lt;p&gt;I ran into this problem with Urdu EPUB files.&lt;/p&gt;

&lt;p&gt;The conversion technically completed. The PDF opened. The pages were there. But instead of readable Urdu text, some readers displayed empty boxes.&lt;/p&gt;

&lt;p&gt;The problem wasn't the extracted text. It was the font.&lt;/p&gt;

&lt;p&gt;Why fonts matter in a PDF&lt;/p&gt;

&lt;p&gt;A PDF isn't simply a text file with page breaks.&lt;/p&gt;

&lt;p&gt;It stores content positioned on a page. Text has coordinates, font information, sizes, spacing, and other properties that determine how it appears.&lt;/p&gt;

&lt;p&gt;When a PDF uses a font that isn't embedded, the reader may need to substitute another font.&lt;/p&gt;

&lt;p&gt;That can cause problems even with ordinary Latin text. Different fonts have different character widths, glyph shapes, and spacing metrics.&lt;/p&gt;

&lt;p&gt;With Urdu, the problem becomes more noticeable.&lt;/p&gt;

&lt;p&gt;Urdu uses a connected script. Characters change shape depending on their position in a word, and the correct glyph shaping and positioning are essential for readable output.&lt;/p&gt;

&lt;p&gt;A font substitution can turn a document that should contain readable Urdu into something that looks like a collection of missing characters.&lt;/p&gt;

&lt;p&gt;The Urdu EPUB problem&lt;/p&gt;

&lt;p&gt;My EPUB-to-PDF converter could extract the Urdu content, but the generated PDF didn't have the right font available.&lt;/p&gt;

&lt;p&gt;I needed a font that actually supported the script.&lt;/p&gt;

&lt;p&gt;I chose Noto Nastaliq Urdu and changed the conversion process to embed the font in the generated PDF.&lt;/p&gt;

&lt;p&gt;That was the important part. Having the font somewhere in the project wasn't enough. The generated document needed to carry the font information so a PDF reader could render the text correctly without depending on the reader's installed fonts.&lt;/p&gt;

&lt;p&gt;After making that change, Urdu text could render properly instead of appearing as empty boxes.&lt;/p&gt;

&lt;p&gt;Why embedding matters beyond the main text&lt;/p&gt;

&lt;p&gt;The same issue can affect features that seem unrelated to font rendering.&lt;/p&gt;

&lt;p&gt;Consider page numbers.&lt;/p&gt;

&lt;p&gt;If a tool adds page numbers using a font that isn't available or embedded correctly, the generated output can have unexpected spacing or missing characters.&lt;/p&gt;

&lt;p&gt;Watermarks have similar requirements. A watermark might look fine in one environment but render differently when opened on another machine.&lt;/p&gt;

&lt;p&gt;This is why I don't treat font handling as a cosmetic detail.&lt;/p&gt;

&lt;p&gt;It is part of producing a valid document.&lt;/p&gt;

&lt;p&gt;What I take away from this&lt;/p&gt;

&lt;p&gt;A successful conversion should be judged by the output, not just by whether the conversion function returned without an error.&lt;/p&gt;

&lt;p&gt;For document tools, I now pay more attention to:&lt;/p&gt;

&lt;p&gt;Whether the generated PDF embeds the fonts it needs.&lt;/p&gt;

&lt;p&gt;Whether the font supports the document's character set.&lt;/p&gt;

&lt;p&gt;Whether text positioning survives the conversion.&lt;/p&gt;

&lt;p&gt;Whether page numbers and watermarks use reliable font handling.&lt;/p&gt;

&lt;p&gt;Whether the result looks correct in a separate PDF reader.&lt;/p&gt;

&lt;p&gt;A file that opens but displays empty boxes isn't a successful conversion.&lt;/p&gt;

&lt;p&gt;This is especially important for documents containing scripts that aren't well supported by default system fonts.&lt;/p&gt;

&lt;p&gt;I want my conversion tools to produce documents that people can actually read, not just files that pass a basic validity check.&lt;/p&gt;

&lt;p&gt;The EPUB-to-PDF converter and the rest of my browser-based file tools are available here: &lt;a href="https://pocketpdf.site" rel="noopener noreferrer"&gt;https://pocketpdf.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>development</category>
      <category>programming</category>
      <category>software</category>
    </item>
    <item>
      <title>Auditing every tool on my site against open source, and what changed</title>
      <dc:creator>Pocket PDF</dc:creator>
      <pubDate>Sun, 15 Nov 2026 13:17:29 +0000</pubDate>
      <link>https://dev.to/pocketpdf/auditing-every-tool-on-my-site-against-open-source-and-what-changed-40bb</link>
      <guid>https://dev.to/pocketpdf/auditing-every-tool-on-my-site-against-open-source-and-what-changed-40bb</guid>
      <description>&lt;p&gt;When I started building PocketPDF, I wrote a lot of the functionality myself. That made sense initially. I wanted to understand how everything worked, avoid unnecessary dependencies, and keep the entire site running in the browser.&lt;/p&gt;

&lt;p&gt;But there is a point where writing everything yourself stops being useful.&lt;/p&gt;

&lt;p&gt;Some problems have already been solved by people who have spent years testing their implementations. Maintaining my own version of those solutions just means taking responsibility for bugs that I could have avoided.&lt;/p&gt;

&lt;p&gt;I recently went through every tool on my site and compared its implementation against established open-source libraries. The goal was simple: stop maintaining code that already had a better-tested alternative.&lt;/p&gt;

&lt;p&gt;Password strength was the first obvious change&lt;/p&gt;

&lt;p&gt;I had a hand-written password strength calculation. It looked at things like length, character variety, numbers, and special characters.&lt;/p&gt;

&lt;p&gt;The problem is that these rules don't tell you much about how predictable a password actually is.&lt;/p&gt;

&lt;p&gt;Consider these two passwords:&lt;/p&gt;

&lt;p&gt;Password123!&lt;br&gt;
x7$Qp9!vLm2@Kz&lt;/p&gt;

&lt;p&gt;The first contains uppercase letters, lowercase letters, numbers, and a special character. A basic scoring system might consider it strong.&lt;/p&gt;

&lt;p&gt;But it is also extremely predictable.&lt;/p&gt;

&lt;p&gt;I replaced the implementation with zxcvbn. It uses dictionaries, common password patterns, keyboard sequences, dates, repetitions, and other predictable structures to estimate password strength.&lt;/p&gt;

&lt;p&gt;That is a much better approach than awarding points for adding another character type.&lt;/p&gt;

&lt;p&gt;CSV parsing: Papa Parse&lt;/p&gt;

&lt;p&gt;CSV looks simple until you encounter real-world files.&lt;/p&gt;

&lt;p&gt;Quoted values can contain commas, fields can contain line breaks, and escaped quotation marks can cause problems for basic implementations.&lt;/p&gt;

&lt;p&gt;Instead of maintaining my own parser, I adopted Papa Parse.&lt;/p&gt;

&lt;p&gt;It handles the awkward cases that a simple split-based parser misses, and it means I don't need to keep fixing CSV edge cases myself.&lt;/p&gt;

&lt;p&gt;ZIP handling: fflate&lt;/p&gt;

&lt;p&gt;I also moved ZIP-related functionality to fflate.&lt;/p&gt;

&lt;p&gt;It is a compact JavaScript library that supports compression and decompression without requiring a server.&lt;/p&gt;

&lt;p&gt;For a browser-based tool collection, that matters. I can use an established implementation while keeping the processing on the client side.&lt;/p&gt;

&lt;p&gt;HTML entities: he&lt;/p&gt;

&lt;p&gt;HTML entity decoding is another example of something that looks easier than it is.&lt;/p&gt;

&lt;p&gt;A few replacements might handle common entities, but a proper decoder needs to understand the actual encoding rules.&lt;/p&gt;

&lt;p&gt;I vendored the he library rather than maintaining a collection of replacements myself.&lt;/p&gt;

&lt;p&gt;Not everything needed a library&lt;/p&gt;

&lt;p&gt;The audit wasn't about replacing every custom implementation with an external dependency.&lt;/p&gt;

&lt;p&gt;Some tools have relatively specific requirements, and writing the implementation myself was still the better option.&lt;/p&gt;

&lt;p&gt;Adding a dependency for a small operation can introduce more maintenance work than it removes. It can also increase download size and make the execution path harder to understand.&lt;/p&gt;

&lt;p&gt;I considered a few things before adopting anything:&lt;/p&gt;

&lt;p&gt;Does the library solve the actual problem?&lt;/p&gt;

&lt;p&gt;Is it actively maintained?&lt;/p&gt;

&lt;p&gt;Is it more reliable than my current implementation?&lt;/p&gt;

&lt;p&gt;What does it add to the download size?&lt;/p&gt;

&lt;p&gt;Can it run entirely in the browser?&lt;/p&gt;

&lt;p&gt;Does it introduce unnecessary complexity?&lt;/p&gt;

&lt;p&gt;If the answer wasn't convincing, I kept my own implementation.&lt;/p&gt;

&lt;p&gt;The actual benefit&lt;/p&gt;

&lt;p&gt;The biggest improvement wasn't a new feature users could immediately see.&lt;/p&gt;

&lt;p&gt;It was reducing the amount of code I personally needed to maintain.&lt;/p&gt;

&lt;p&gt;Every custom parser, scoring algorithm, or format handler is another place where an edge case can become a bug. Using a suitable library means I can spend more time fixing problems specific to my tools instead of rebuilding common functionality.&lt;/p&gt;

&lt;p&gt;I still want the site to be lightweight, static, and browser-based. Using open-source libraries doesn't mean abandoning those goals. It means being more selective about what I build myself.&lt;/p&gt;

&lt;p&gt;I documented the project and its tools here: &lt;a href="https://pocketpdf.site" rel="noopener noreferrer"&gt;https://pocketpdf.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>softwaredevelopment</category>
      <category>tools</category>
    </item>
    <item>
      <title>How I built pocketpdf.site — the file tools I always wanted</title>
      <dc:creator>Pocket PDF</dc:creator>
      <pubDate>Sun, 15 Nov 2026 11:23:56 +0000</pubDate>
      <link>https://dev.to/pocketpdf/how-i-built-pocketpdfsite-the-file-tools-i-always-wanted-ge7</link>
      <guid>https://dev.to/pocketpdf/how-i-built-pocketpdfsite-the-file-tools-i-always-wanted-ge7</guid>
      <description>&lt;p&gt;I've always wanted a simple place where I could quickly edit, convert, or manage files without having to install another application or sign up for yet another account.&lt;/p&gt;

&lt;p&gt;Most online file tools either make you deal with unnecessary steps, limit what you can do, or put basic features behind a payment wall.&lt;/p&gt;

&lt;p&gt;So I decided to build my own.&lt;/p&gt;

&lt;p&gt;Meet PocketPDF — a collection of free, browser-based tools for working with PDFs, images, text, code, and audio/video files.&lt;/p&gt;

&lt;p&gt;Why I built it&lt;/p&gt;

&lt;p&gt;The original idea was pretty straightforward: create a website where you can open a tool, drop your file, do what you need, and get the result.&lt;/p&gt;

&lt;p&gt;No complicated workflow. No unnecessary account creation. No software installation.&lt;/p&gt;

&lt;p&gt;I wanted the experience to feel simple enough that anyone could use it without needing a tutorial.&lt;/p&gt;

&lt;p&gt;But building something that looks simple on the outside isn't always simple behind the scenes.&lt;/p&gt;

&lt;p&gt;What's inside?&lt;/p&gt;

&lt;p&gt;PocketPDF includes tools for different types of everyday file tasks.&lt;/p&gt;

&lt;p&gt;PDF tools cover things like merging, splitting, converting, protecting, and working with PDF documents.&lt;/p&gt;

&lt;p&gt;Image tools help with common image editing, conversion, and optimization tasks.&lt;/p&gt;

&lt;p&gt;Text and code tools handle various formatting, conversion, and development-related utilities.&lt;/p&gt;

&lt;p&gt;Audio and video tools provide browser-based processing for supported media formats.&lt;/p&gt;

&lt;p&gt;The goal isn't to build another complicated software suite. It's to make small, useful tools that solve specific problems without getting in your way.&lt;/p&gt;

&lt;p&gt;The interesting part: making everything work in the browser&lt;/p&gt;

&lt;p&gt;One of the things I wanted from the beginning was to keep processing client-side wherever possible.&lt;/p&gt;

&lt;p&gt;That means the browser does the actual work instead of relying on a traditional server-side processing workflow.&lt;/p&gt;

&lt;p&gt;It also creates some interesting technical challenges.&lt;/p&gt;

&lt;p&gt;Different file formats require different libraries and processing approaches. Some operations are lightweight, while others need considerably more resources.&lt;/p&gt;

&lt;p&gt;Audio and video processing is a particularly interesting challenge because of the additional processing engines involved.&lt;/p&gt;

&lt;p&gt;Getting all of these things to work together while keeping the interface reasonably simple has been an ongoing process.&lt;/p&gt;

&lt;p&gt;It's not perfect (and that's okay)&lt;/p&gt;

&lt;p&gt;I don't want to present PocketPDF as some finished, flawless product.&lt;/p&gt;

&lt;p&gt;There are still things to improve, bugs to fix, and edge cases that I haven't encountered yet.&lt;/p&gt;

&lt;p&gt;Different browsers, file types, and devices can behave differently. Something that works perfectly on my machine might not work the same way for someone else.&lt;/p&gt;

&lt;p&gt;That's one of the reasons I'm putting it out there.&lt;/p&gt;

&lt;p&gt;I want people to actually use it, try different tools, and report anything that breaks or feels frustrating.&lt;/p&gt;

&lt;p&gt;Honest feedback is much more useful to me than someone simply saying it looks good.&lt;/p&gt;

&lt;p&gt;What's next?&lt;/p&gt;

&lt;p&gt;I'll continue improving the existing tools, fixing reported issues, and working on the overall experience.&lt;/p&gt;

&lt;p&gt;I also want to keep the interface straightforward. Adding more features isn't particularly useful if the website becomes harder to navigate.&lt;/p&gt;

&lt;p&gt;PocketPDF started as a project to solve everyday file problems for myself. Now I'd like to make it useful for other people too.&lt;/p&gt;

&lt;p&gt;If you work with files regularly, give it a try. And if something doesn't work, please let me know.&lt;/p&gt;

&lt;p&gt;Project: &lt;a href="https://pocketpdf.site" rel="noopener noreferrer"&gt;https://pocketpdf.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>showdev</category>
      <category>tools</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
