Wednesday, February 07, 2007

pdftk frontend for KDE

Well, a week yes and the next one too, there is some request to add pdf modification options either to kpdf or to okular. This requests are always dismissed with "kpdf/okular is 'just' a viewer, not a swiss-tool".

That said i started to look for pdftk frontends i could suggest to the people and i could not find any good one so i thought i can try to create 'PDF Transformer' (work in progress name) as a "good" frontend for pdftk. The problem is defining "good", so fellow readers i'm asking for some help here, i'd describe what i have in mind and hope to get some comments if it seems good or not. Also if you know of a "good" frontend for pdftk just tellme and i'll be happy to scrap one thing from my todo list.

pdftk can do lots of things that are easy to do in dialogs and a relatively user friendly way, it's just merging of documents, modifying page ordering and removing of pages that i'm not sure how to implement in a way that can be more easy than just typing the whole command at the cli. My current idea is in this this mockup. You open the document[s] you want to use as input and get the list on pages on the left and a preview of the current selected page, you can rotate the currently selected pages, move them up or down or remove them. After you are finished you "create" the output file.

Ideas? Suggestions?

25 comments:

  1. I wondered :
    Wouldn't Kword be of use if it were able to better import pdf ( it seems it already can, but not so good)

    Then, after you modify the document, you just export it as pdf.
    If you realy need to edit advanced part of pdf, then use the one I can't remember the name, which is on kde apps, and developed by eastern europe students.

    Note : I am not realy a pdf user, made 2 such documents in my life.
    But I thought that, if you just whant to modify the layout, add text, ... to a pdf, Kword may be what you need ?

    ReplyDelete
  2. I would LOVE it if there were a good kde pdf editor!!! Even just the ability to fill in a form and save the modifications (Adobe Reader will let you fill in a form but not save it, which is really frustrating when, say, filling out an application that I want to proof read and then edit some more later).

    ReplyDelete
  3. I would second the suggestion that the best PDF editor is KWord. People should only need to learn one general-purpose editor interface for modifying rich documents (ODF, PDF, DOC, etc).

    ReplyDelete
  4. Hi !

    I'm a graphic design student and I learned that producing and editing pdf files is CRUCIAL in graphic design jobs.

    You need to be able to make a pdf out of a postscript file (it's the beginning of every print task), crop a page or multiple pages, and add some visual hints around the page for the printer (the man, not the device).

    These are the most important features. I'm really hoping Linux will have better professional graphic tools since I love OSS philosophy, but right now I'm planning to get a mac since I can't do the job done on my favorite OS.
    Pdf editing is a sweet start. Good luck.

    You might want to build a very basic editor, but be assured there's a demand for more.

    PS : Kword as it is now is not good at producing hig quality documents since it lacks moveable guides, free moving and precise positioning of elements. It's ok for office use, but nothing like flyers, documentation, catalogues and other professional documents. For this kind of job you're stuck with QuarkXpress, Indesign or Scribus (which is a pain to use) on OSX or windows. Kword 2 seems to be slightly shifting focus toward professional publishing.

    ReplyDelete
  5. Just a quick note. I just got done filling out my IRS tax forms using acroread in Linux and was able to save my input and recall and change it later. I am running the latest acroread for Linux under Gentoo...

    ReplyDelete
  6. all I want is to be able to fill out forms before printing them. preferably without hunting down extra software.

    ReplyDelete
  7. This is a great way to use pdftk: http://www.kde-apps.org/content/show.php?content=37321

    Everyone else here seems to be responding to something you didn't say. He was only talking about making a frontend to pdftk, not some new editor/way to save filled in forms/kword pdf improvements.

    ReplyDelete
  8. Apologies for the bad link. This is the proper link.

    ReplyDelete
  9. It colud be good if you could rearange and rotate pages just dragging the left previews. It could be a good usability feature.

    ReplyDelete
  10. i still don't get why kpdf shouldn't have basic pdf editing capabilities, like a modern picture/photo viewer had basic effects... okular will change pdf's anyway, with the annotation stuff, so it's rather weird to not want these basic transformation stuff in there because 'a viewer doesn't edit files'.

    but alas, can't we have it as a pdf plugin, then? pdftk is very basic, imho shouldn't be a seperate app. an application which can REALLY edit PDF's like text, layout, pictures -THAT could have it's own app (tough integration in koffice would be nice too). but not those basics, like extracting a page or stuff like that...

    ReplyDelete
  11. Pdf Service Menu Pack does it all allready ! Why do you want to re-invent the wheel ??

    Here : Pdf Service Menu Pack (Pdftk Service Menu and PdfJam service Menu) on KDE Apps.

    For the other guys, please READ the blog. TSDgeos did not say he wanted to create an editing pdf program, but just a GUI for pdftk (thats to say crop, rotate, extract, merge pdf pages etc ...).

    ReplyDelete
  12. Have you ever used Quark XPress? I like how it handles pages.

    Instead of using «Move Up» and «Move Down» buttons, you can drag and drop the pages to the location you want.

    It should also be possible to place pages one in front of the other, as in a book or magazine.

    ReplyDelete
  13. Interesting project... if you prepare some code, could you write it here? I would like to know it to, maybe, help

    carles pina

    ReplyDelete
  14. @excrusader and anonymous: Yes, i've seen the pdftk service menu, and now, tellme how are you going to get , this:
    FirstDocument, page 9, rotated 90º
    SecondDocument, page 1
    FirstDocument, page 3, rotated 180º
    when merging 2 documents with 10 pages each

    I do not see how i can do that using the service menus, i'm not saying it's not possible, just that does not seem as easy to do as whith the interface that i propose.

    ReplyDelete
  15. albert, seen http://pdfedit.petricek.net/pdfedit.index_e ???

    ReplyDelete
  16. Sorry if I came off as trying to imply that your project is without merit. That wasn't my intention at all, and I apologize if I came off that way. I was merely pointing out that there is already some work done in the same area.

    As for your question, I don't think the service menu can rotate pages at all, if memory serves. The rest can be done, but it would take a couple of steps to complete. I am in full agreement that your proposal would be a much better option.

    ReplyDelete
  17. Absolutely refuse from such features. PDF was created to be the "final format". It was designed to contain the contents in a way that it is always reproduced the same everywhere. In short: It was meant for press and print business, for sending files to be printed exactly as the author meant.

    The fact that you "can" edit PDF does not definitely mean that you should edit it. It would be defeating the whole purpose of the PDF format.

    Yes, I'm aware it has roots in PS (which is a descriptive language for printing) and that you ahve active forms nowadays and such.. But that doesn't really change a thing. The changes are supposed to be bundled, the original is supposed to be never modified in any way.

    ReplyDelete
  18. If we are talking simple manipulations of PDF files, I would imagine a photo management or video editing type of GUI - a time-line-like or film-strip-like arrangement along the bottom of the window. You would have a particular page preview / rotation / manipulation in the center.

    There are 2 types of manipulations PDFTK allows you to do: changing page's place in line and changins some attributes of the page while it's in line. For both purposes, the horizontal flow arrangement with focus on a page in the center could mean a boon fro ease of manipulation and good use of width of today's monitors.

    ReplyDelete
  19. I would really like to see a software to do manipulation on pdfs under kde. I used pdftk with servicemenues, but normally I start my Windows in Parallels to work with the Acrobat 7.0 Full Version because the servicemenue is too complicated and unintuitive. I like the way Acrobat does the job. You can rearrange pages by Drag and Drop, you can insert pages from another pdf by a menueentry, you can delete Pages be marking them in the thumbnail view, you can crop and turn pages.

    ReplyDelete
  20. -- Change and Edit a pdf with a viewer?
    Some arguments...

    PDF ist a successor of ps and is originally used to describe layouted content for printing uses. But over the last decades, it became more and more multipurpose with many features like forms, annotations, transparencies, javascript etc. It is used in many ways in professional workflows of knowledge workers. One of the big drawbacks of linux for professional use is, that it is not capable of do these jobs on pdf. Kpdf was a breakthrough and with oKular things change: Support for annotations and forms make workflows possible. But another important thing are usecases like this: (1) Tom did a scan of a journal article with his multipurpose printerscanner which is sent in pdf format to his computer. But there is an ugly black border on the right and the bottom side of each page. With oKular, he can crop this border from all pages in one step and send the pdf to his colleage. (2) Tom has another problem with the same scan. It was sent in a wrong direction and cant be read onscrean, so he changes the direction of all pages and now his colleage can read it (3) Fred finishes a report for a project. He did the main text part with openoffice, but for the beautiful cover he used scribus. Additionally he wants to include some single pages from another pdf with photos and tables. With oKular he can combine these pdf pages to a new pdf which he puts on the companies website.

    And so on...
    In my work I have often usecases like this and I can't see, why oKular should not be able to handle these cases.

    The opposition of viewer and editor is too simple in my opinion. PDF ist a page oriented program and a pdf application should be able to manipulate pages. This ist not editing pdf objects like in pdfedit and it is not at all parsing pdf pages like in kword, which is not possible if the layout is more complicated like with multicolumns and footnotes. A rearrangement of pages should preserve the layout absolutely and this is impossible which parsing in a texteditor and creating a new pdf from the parsed content.

    ReplyDelete
  21. I dont see the point in editing PDF-files. There are always source-files out of which the PDFs are compiled. So edit the source-files and make a new one.

    And to the form issue: Isnt it possible to use OOo for this?

    ReplyDelete
  22. I agree with the drag-and-drop comments, but think that the page list on the left is the wrong way to do it, it doesn't scale to more than a few pages and you can't get a decent overview of a whole document at once. Imagine a 50 page document where you just need to rotate or delete page 35.

    Think instead of something like konqi's file icon view, or digikam's album view. Have all the pages listing from left-to-right and wrapping to the next line in the main window, then allow re-ordering by simply dragging pages around and hitting save. Save should always actually be Save As, as I think this is the more frequent case? Delete and rotate would be standard actions available through rmb menu, toolbar icons or keyboard shortcut. Multiple page selection would be available, obviously.

    Merge would be a case of clicking Add, selecting a file(s), and the new pages are added to the page preview view ready to be moved, deleted, rotated, then saved.

    I'm not sure you would always need a full page view, especially when you allow for multiple page selections, instead a double click would pop it up when really needed.

    John.

    ReplyDelete
  23. Just another use case.

    I write a memo/ contract, print and (analogue) sign the last page.

    Now I want to email/ save on web as a PDF.

    I could scan the entire document, and save as bitmapped PDF which is huge.

    Or convert the document to PDF and just scan the signature page.

    Then I need a tool like pdftk to merge the pages to create one document.

    I have had some success with flpsed but a KDE native would be great!

    ReplyDelete
  24. There is also an application called pdf-shuffler which allows you to rearrange pages using drag and drop.

    This sort of functionality could be in-built into okular: you would just need to drag and drop the thumbnails. If you drag and drop from different okular windows, then the pages would be combined. Interface-wise it would be simple and intuitive.

    ReplyDelete