kohheepeace / mr-pdf

Generate PDF for document website.
https://www.npmjs.com/package/mr-pdf
MIT License
128 stars 41 forks source link

Convert each page to html, join the html, then convert to PDF #10

Closed kohheepeace closed 3 years ago

kohheepeace commented 3 years ago

Borrow the @bojl idea of this PR for making internal links work.

idontknowjs commented 3 years ago

Hey @kohheepeace, we've been using mr-pdf for generating the Docusaurus PDF of version v2.0.0beta-0. Will this issue solve the following issue? Or a new issue needs to be created?

But internal links have not been working.

You can find the PDF of https://zowe-docs.netlify.app/ (here). For reproducing the issue.

image

image

In both the cases it should redirect to the user to the section in the PDF only - not to the online version?

kohheepeace commented 3 years ago

@covalentbond I will check๐Ÿ‘

kohheepeace commented 3 years ago

@covalentbond I confirmed that internal link works well after fixing this issue. I will PR in a week.

idontknowjs commented 3 years ago

Thanks @kohheepeace looking forward for the fix!

Apart from this issue, I encountered another issue that:

In https://zowe-docs.netlify.app/ we are having different sections like "Get Started", "User Guide", "Extend"... But while running the script with --initialDocsURL="https://zowe-docs.netlify.app/stable/getting-started/overview. The PDF generated contains only "Getting Started" section - not the complete documentation. How to include all the other sections as well?

kohheepeace commented 3 years ago

@covalentbond I came up with the idea to make multiple sections. I will tackle it.๐Ÿ‘ also hope your star for my resume.๐Ÿ‘

idontknowjs commented 3 years ago

Sure, waiting for these fixes. Just FYI I'm also at the end of an internship, where fixing this PDF functionality would mostly complete all the task. The completion is also imp for my resume. ๐Ÿ˜‚

kohheepeace commented 3 years ago

@covalentbond I just implemented the feature๐Ÿ‘

idontknowjs commented 3 years ago

@kohheepeace the links present in the TOC are working.

But links refering to other internal doc is still not working. The second and third issue mentioned in this comment still exits.

For eg. This is a line present in any docs For more information, see [Installing Zowe SMP/E Alpha](../user-guide/install-zowe-smpe.md). This kind of link is still not working. Please look into it.

kohheepeace commented 3 years ago

@covalentbond Thanks that it true ๐Ÿ‘