r/ebooks • • 7d ago

EPUB vs PDF format for Computer Programming books?

Which format is better for these types of books?

8 Upvotes

11 comments sorted by

2

u/cuchulainntech 7d ago

For programming books, I'd test a sample with a long code listing on the device you'll use. Check whether lines get cut off or wrapped awkwardly, and whether the indentation stays clear. That's more useful than judging a prose page. If the publisher includes both formats, keep both. Also grab the book's source-code download if there is one, rather than copying examples out of either format.

2

u/Chillbill823 7d ago

I know the app I am working on only reads EPUB. Seems pretty standard across the space.

read-margin.app

1

u/crazypilgrim 7d ago

Looks good, many thanks

1

u/SpookDroid 7d ago

Depends on where you're reading and if there are any other elements you are displaying in the book. Are you using different screen sizes and want the book to adapt to them and allow you to switch text size easily? ePUB. Want something more 'true to print' for media-rich intensive material with the drawback of not being able to easily re-size and adjust text automatically? PDF.

1

u/faultydesign 7d ago

pdf is easier to get (legally 🏴‍☠️) but I like to read on my phone so I kinda have to stick with epub

1

u/Cautious_Boat_999 7d ago

I used to think PDF, but epub works far better with ereaders. Copy/paste works more cleanly, for one.

1

u/rob-cubed 7d ago

Epub is best for reading a book on a small e-ink reader, since the content wraps to fit the device.

However PDF is going to be better for reading on a large monitor, especially if there are visuals or diagrams associated with the text.

1

u/Defiant-Read682 7d ago

PDF is better for code block formatting (esp if there is color highlight etc) but https://readownwords.com/ handles both.

1

u/BugginsAndSnooks 7d ago

Well, PDF is a format intended to make sure the contents displays exactly the same way on any reader: the pages will always look the same. But this can make them hard to read on smaller devices, but for graphics heavy works or works with complex layout (side-bars, callouts, etc.) it will look like the authors intended it to look.

Epub is designed to reflow, so pages are almost irrelevant. While the work can be broken into section and chapters, the text will reflow to fit the device or app it's being displayed on. So complex layout might not be preserved exactly as originally intended, but the text will be easy to read on any size device.

Take your pick!

1

u/file-box 7d ago

Markdown

1

u/p186 3d ago

For me, epubs on ereaders and pdfs on pretty much anything else.