Skip to content

Features/outline#831

Merged
alafr merged 12 commits into
foliojs:masterfrom
theBenForce:features/outline
Jun 22, 2018
Merged

Features/outline#831
alafr merged 12 commits into
foliojs:masterfrom
theBenForce:features/outline

Conversation

@theBenForce

Copy link
Copy Markdown
Contributor

Basic outline support based on @alexvdev's work.

@alexvdev

Copy link
Copy Markdown

Great that you finalised my work and put the feature to trunk!
How can we test it?

theBenForce and others added 3 commits June 20, 2018 08:04
Removing natural language code since it's from another branch and not relative to this pull request
@theBenForce

Copy link
Copy Markdown
Contributor Author

I updated the code that generates the guide so that it has outline bookmarks. I also added a short section on how to use the feature.

Is this an adequate method of testing? I didn't see any unit tests setup.

@zoosky

zoosky commented Jun 20, 2018

Copy link
Copy Markdown

Ping @alafr

@alafr

alafr commented Jun 20, 2018

Copy link
Copy Markdown
Collaborator

Unfortunatelly I don't have enough time to install, test, and merge pull requests right now.
Did you try to make the changes requested here: #216 (comment) ?

@theBenForce

theBenForce commented Jun 21, 2018

Copy link
Copy Markdown
Contributor Author

@alafr I just modified my changes to follow the referenced comment. I didn't implement the addSection method and just return the PDFOutline object from the addItem method instead.

@theBenForce

Copy link
Copy Markdown
Contributor Author

Should be ready to go now. I've updated the documentation to reflect the new methods. Let me know if anything else needs updated.

@alafr

alafr commented Jun 22, 2018

Copy link
Copy Markdown
Collaborator

Thanks, it works great.
Just a few details:

  • In my opinion the outline panel should be opened by default if the document has outlines. It can be done with @_root.data.PageMode = 'UseOutlines'.
  • The expanded option is not described in the documentation.
  • Is the require('assert') module in lib/mixins/outline.coffee still used?

You can also move them from Coming soon to Features in the readme

@theBenForce

Copy link
Copy Markdown
Contributor Author

@alafr, I've made the requested changes.

@alafr alafr merged commit f91bdd6 into foliojs:master Jun 22, 2018
@theBenForce

Copy link
Copy Markdown
Contributor Author

When is the next planned version release? I'd like to be able to use this with npm.

@alafr

alafr commented Jun 24, 2018

Copy link
Copy Markdown
Collaborator

I don't have access to npm, in the meantime you can replace with npm install pdfkit with npm install https://github.com/devongovett/pdfkit/tarball/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants