Modifying PDFs: insert/delete/reorder

Albert Astals Cid aacid at kde.org
Wed May 5 00:06:50 BST 2021


El divendres, 30 d’abril de 2021, a les 22:45:41 (CEST), Scott Howard va escriure:
> Hey folks,

Hi

> I was hoping to get some guidance/input on a feature that I'm hoping to add
> to Okular. In looking at the code, I'm suspecting that poppler is the
> limiting factor for supporting insert/delete/reorder operations on a PDF.
> Is this something that has been considered?

What do you mean "limiting factor"? poppler can insert/delete/reorder pages, that's what pdfseparate and pdfunite do, right? and they are poppler tools.

Or you mean that the poppler-qt API doesn't support that?

> 
> I've used Adobe Acrobat extensively, and in compiling professional reports,
> the ability to insert/delete/reorder is very useful. While there are other
> tools that can be used to accomplish the same goal, I feel it would be
> beneficial to include this functionality in Okular, as the default PDF
> application on KDE.

As I have mentioned a lot of times, I don't think that functionality makes sense in Okular.

Okular defines itself as a document viewer, yes, it has some very light editing features (forms and annotations) but those are just adding on top of the existing document, and fit very well in a page centric user interface.

For inserting/deleting/reordering pages you want a totally different kind of user interface, something more like a grid of pages, where you can import various documents and let people move pages around, that's an interface that doesn't exist in Okular.

Also doing it in Okular means extra work because you need to abstract everything because we are not a PDF application, we are a Document viewer, so you need to have abstract classes that work for all document formats even if at the end you're only going to implement it for PDF.

My suggestion has always been implement a standalone application that does this, you can have an user interface that makes sense for what you want to do and you don't need to implement the extra boilerplate that implementing the feature in Okular would mean.

And sure, if you want we can call that application from a menu entry in Okular like we invoke the email client to send an email, we don't have not implemented email sending in okular even if people want to send emails from it ;)

Cheers,
  Albert

> 
> Thanks,
> Scott Howard
> 






More information about the Okular-devel mailing list