boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...
MIT License
734 stars 156 forks source link

Enable merging PDF outlines (aka bookmarks) #70

Closed sLe1tner closed 8 years ago

sLe1tner commented 8 years ago

Hey Bo, I think we might be done, finally :)

I made one more small change: The way the position used to get checked, resulted in inserted outlines always being at the start unless the inserted PDF file was appended to the end. I just switched that, to be the other way around, so now the inserted outline will always be appended to the end, unless a PDF gets inserted at the start, then it's outline will also be inserted at the beginning. That just feels right, compared to how it worked before, in my opinion.

I left the method I used for printing the hash to a file in there because I thought it might be useful for anyone who decides to work on the outlines hash in the future..

Also, I may have gone a bit overboard on documenting that merge method..

boazsegev commented 8 years ago

Thank you so much, I'm excited to test this out! 👍🏻💛💚💙💚💛

P.S.

As to the begging/ending logic, I like the new logic better.

And since I'm bad at documenting, I'm happy you took the time. Wordiness is sometimes better then obscurity.

boazsegev commented 8 years ago

I added a line in the copyright statement (the license file). Remove / edit at your discretion.