Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a outline before or after merging pdf #134

Open
ghost opened this issue Nov 13, 2017 · 1 comment · May be fixed by #170
Open

Creating a outline before or after merging pdf #134

ghost opened this issue Nov 13, 2017 · 1 comment · May be fixed by #170

Comments

@ghost
Copy link

ghost commented Nov 13, 2017

Hi @boazsegev ,
its tenzil again, i hope you remember my question about clearing outlines. https://github.com/boazsegev/combine_pdf/issues/133,
this time i want to clear all outlines in second pdf and create a new custom outline for that second pdf.
Such that the second pdf will have only one outline created by me.
I have gone through your code, i am not able to find something like "define / update " method like in prawn.

@ghost ghost changed the title Creating a outline before merging pdf Creating a outline before or after merging pdf Nov 13, 2017
@boazsegev
Copy link
Owner

boazsegev commented Nov 13, 2017

Hi @ltenzil ,

CombinePDF was designed as a "Hacking" tool rather than an Authoring tool, as a response to Prawn dropping their template support.

My original need was simple, I needed to add cover pages and numbering to existing PDF files (and sometimes stamp an overlay over every page).

I'm happy to see the library grow ad support more features. Merging outlines was one of these features.

Hoever, authoring an outline from scratch wasn't something I considered before.

I will be happy to add this feature to upcoming releases, but it will be a while before I can relearn this part of the design and implement something that makes sense and allows for "trees" rather than just a single flat outline (if someone authors a PR, that would be great).

I'm leaving this question open as a reminder to implement this feature and as an invitation for possible contributors.

Until that day, it's possible for anyone to "Hack" an outline without any help from a helper API.

It isn't as easy without an API, but it should be possible to link a page object to an outline by analyzing an existing outline and following the same pattern. The page will (probably) be linked using a small Hash object {is_reference_only: true, referenced_object: page}.

Other options (such as location inside the page) might be harder to reproduce without some trial and error.

Good Luck!
B.

@edman193 edman193 linked a pull request Jun 4, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant