If you have ever tried to convert a Kindle book into a PDF only to find the result looks like it was typeset by an angry intern, you are not alone. E-book formats such as AZW3 and KFX are designed to reflow to fit the screen of whatever device you are reading on. That is a great feature for a Kindle or a tablet, but it becomes a problem the moment you want to print a chapter, annotate a page with fixed layout, or archive a book so the formatting survives on every future device.
If you need this as one file, our free organize pdf tool runs entirely in your browser — nothing is uploaded.
The goal of this guide is simple: take a reflowable e-book file and turn it into a clean, readable PDF that respects the author's intended layout as closely as the format allows. We will walk through why reflowing matters, how the AZW3 and KFX formats actually store content, and the practical steps you can take locally to get a polished result without uploading your files to a third-party server.
Most people assume that opening an e-book in a reader app and choosing "Print to PDF" is a finished job. In reality, the reflowable nature of the source file means the reader app has to make layout decisions on the fly. Those decisions are driven by the screen width, font size, and line spacing of the device that is currently showing the book. When you print from a phone, you get a narrow column of text. When you print from a desktop, you get a wide page that may have large gaps between paragraphs because the original file was not built for a fixed page size.
The result is a PDF that is technically valid but practically ugly. Margins are inconsistent, footnotes get orphaned, and images that were sized for a 7-inch Kindle screen either shrink to a thumbnail or overflow the page. The fix is to stop thinking about "printing a reader app" and start thinking about "rendering the book into a target page box."
Amazon's current e-book formats are not simple text files. AZW3 is a container built on top of the Fixed Layout and Reflowable Document standards, and KFX is a more recent container that adds digital rights management layers and a richer metadata structure. Both formats store content in a mix of XHTML, CSS, and binary resources such as images and fonts. The important detail for conversion is that the CSS inside the container often references device-specific media queries.
When you extract the content of an AZW3 or KFX file, you are not just getting plain HTML. You are getting a set of resources that were designed to be interpreted by a reflowable renderer. That renderer has to decide where page breaks go, how to handle footnotes, and which font to use when the original embedded font is missing. A good conversion pipeline handles these decisions explicitly instead of leaving them to chance.
One of the biggest advantages of handling e-book conversion locally is privacy. E-Books often contain personal annotations, highlighting, and notes that you do not want to send to a cloud service. A local workflow also gives you full control over the output. You can choose the page size, the font, the margin, and whether to preserve images or strip them for a text-only archive.
The workflow we recommend has four stages. The first stage is unpacking the e-book container. The second stage is normalizing the HTML and CSS so that reflow-specific rules are removed and fixed-layout rules are applied. The third stage is rendering the normalized document into a PDF with a chosen page box. The fourth stage is proofreading the result, because no automated pipeline is perfect on the first pass.
Each of these stages can be done with free, open-source tools that run on your own machine. You do not need to upload your files to a server, and you do not need a paid desktop suite. The entire process can be completed in under ten minutes for a typical 300-page novel once you have the workflow set up.
Both AZW3 and KFX files are ZIP-like archives with a proprietary internal structure. You can unpack them with a standard archive tool, but you need to be aware that some KFX files use DRM encryption that will not unpack cleanly. If the file is DRM-protected, the conversion pipeline will not be able to extract readable content, and you should respect that protection and not attempt to strip it.
For unprotected files, you will typically find a content document in the root of the archive, along with a manifest, a CSS file, and an assets folder that holds images and fonts. Renaming the extension to .zip is often enough to open the archive in a file manager. Once unpacked, you have a plain directory tree that you can inspect with a text editor and a browser.
This is the step that separates a clean PDF from a messy one. Open the main content document in a text editor and look for CSS rules that reference screen dimensions, media queries for reflow, and JavaScript that manipulates the layout. Remove or neutralize those rules so that the document behaves as a fixed-layout document instead of a reflowable one.
Set a fixed page size in the CSS. For a standard book layout, use a page box that matches a physical book, such as 5.5 by 8.5 inches for a US trade paperback, or A5 for a European market. Add consistent margins that you would expect on a printed page. Replace any web-safe font references with a font that is actually embedded in the PDF, or with a system font that will render consistently on the machine doing the conversion.
Images are another common source of mess. If the e-book contains cover art, illustrations, or diagrams, check their dimensions and make sure they are sized to fit within the text column. If an image was sized for a small Kindle screen, it may need to be scaled up. If it was sized for a large tablet, it may need to be scaled down. You can do this with a simple image tool or by setting explicit width and height attributes in the HTML.
Once the HTML is normalized, you need a renderer that respects the fixed page box and produces a PDF. The most reliable approach is to use a headless browser or a print-to-PDF pipeline that supports CSS page boxes. The renderer will lay out the document page by page, insert page breaks where the CSS or the content dictates, and embed the fonts and images into the final PDF.
The key setting is the page size. Set it to the dimensions you chose in the CSS. Set the margins to zero in the renderer and let the CSS handle the margins, because mixing renderer margins and CSS margins produces double margins. Make sure the renderer is set to print backgrounds, because many e-books use background colors for footnotes, pull quotes, and decorative elements.
Automated conversion will get you 90 percent of the way, but the last 10 percent is where you catch orphaned footnotes, images that overflow the page, and font fallbacks that look wrong. Open the resulting PDF in a reader and scroll through it. Look specifically for the first page of each chapter, because that is where layout errors most often appear. Check that the running header and footer, if any, are positioned correctly.
If the PDF looks clean, you now have an archive-quality copy of the e-book. You can store it alongside the original e-book file, share it with a reading group, or print it for a personal binder. Because the conversion was done locally, no copy of your annotations ever left your machine, and the final PDF is a stable file format that will remain readable in fifty years.
A few habits will make the entire pipeline smoother. First, always work from a clean copy of the e-book file. If you have been adding notes in a reader app, the file may have been modified in ways that break the conversion. Start from the original purchase file every time.
Second, keep your CSS changes minimal. The more you rewrite the original stylesheet, the more you risk introducing errors. A good rule is to add a small layer of overriding rules instead of editing the original file. That makes it easy to undo the changes and keeps the conversion repeatable.
Third, test on a single chapter before converting the whole book. A quick render of the first three chapters will surface most of the layout issues, and it saves you the time of converting a 500-page book only to find that the image handling is wrong.
No, and you should not try to strip DRM. KFX and some AZW3 files are encrypted with digital rights management, and the conversion pipeline cannot extract readable content from an encrypted file. If the file is protected, the only legal path is to use it on an authorized device. The local workflow described in this article works on unprotected files that you are permitted to redistribute in another format.
That is the reflow renderer doing its job. The reader app is still laying out the book for the screen it thinks it is on, and the print-to-PDF path is capturing that layout instead of a fixed page box. The fix is to stop using the reader app's print function and instead normalize the HTML into a fixed-layout document, then render that document with a renderer that respects the CSS page size. The pipeline in this article is built around that approach.
Local conversion is safer for two reasons. The first is privacy: e-books often contain personal notes, highlights, and annotations that you do not want to send to a third-party server. The second is control: a local pipeline lets you choose the page size, the font, the margins, and whether to include images, which is impossible with a one-click online tool that applies a single preset to every file. For most readers, the local workflow takes only a little longer and produces a noticeably better result.
Turning a reflowable e-book into a clean PDF is not a magic trick. It is a small pipeline with four steps: unpack the container, normalize the HTML and CSS, render with a fixed page box, and proofread the result. Every step can be done with free tools on your own machine, and the whole process respects the privacy of your personal library. Once you have the workflow set up, converting a new book is a matter of minutes, and the resulting PDF is a stable, readable archive that will outlive any single e-book reader app.
If you want to see this kind of local, no-upload conversion applied to other document types, the site also covers converting PDF to Word on a phone and converting PDF to Word without uploading files to a server. The same local-first philosophy applies: the file stays on your device, the preview is free, and the output is something you can actually read.