What is Sejda?
Sejda is a Java library meant to simplify some common Pdf documents manipulations like split, merge, rotation, etc. It is an abstraction layer that allows developers to add Pdf manipulation capabilities to their applications without having to deal with low level API. Different implementations of the available tasks can be used to maximize flexibility and to take advantage of the strength points of the underlying pdf manipulation libraries.

Why Sejda?
Sejda as the natural evolution of PDFsam. When I started to develop PDFsam, more than 10 years ago, I was a young, enthusiastic and not really experienced developer. In those years PDFsam grew a lot with new features, user suggestions and bug fixes and I also made a lot of personal experience in software development but I realized at some point that some of the design choices I made were unfortunate and the code base wasn’t inline with new software development standards. PDFsam itself was working pretty well but maintenance was a bit of a hell so I made the choice, I started to rewrite the PDF manipulation logic with 5 years of experience on my shoulders and trying to keep a close eye on quality and best practices. Sejda now replaces what was the pdfsam-console and its SAMBox tasks implementations are powering PDFsam v3, it has more features, it has a bigger team working on it (we are 2 now), it’s built trying to follow best practices from Joshua Bloch in Effective Java and Robert C. Martin in Clean Code, it’s easier to maintain and extend and it’s not tied to a single pdf manipulation library but it tries to take advantage of strength points of all of them.

Does Sejda implement PDF specification?
No. Sejda is not a PDF manipulation library itself but it can use different available libraries to manipulate PDF documents. It currently uses SAMBox, a PDFBox fork that we modified and maintain, as PDF engine for most of the tasks and ICEpdf for PDF to image conversion tasks. A developer can simply populate a parameter object and execute it with the configured task implementation without knowledge of the underlying library/libraries API.

What is a task in Sejda domain?
A Sejda task is one of the available PDF documents manipulations. Sejda provides its own tasks implementation but a developer can provide its own using a different PDF engine and configure Sejda to use it. This approach allows to maximize efficiency and flexibility.

How does it work in few words?
Let’s assume you want to add PDF rotation capabilities to your application. With a low level PDF manipulation library you learn the library API and implement the rotation. With Sejda you have to create and instance of a parameter object, populate it with your parameters (pages you want to rotate, type of rotation..) and execute it.