diegomura / diegomura/react-pdf

Inject external PDFs into react-pdf document

Open
#735 21 comments 40 reactions 0 assignees View on GitHub
new feature
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Is your feature request related to a problem? Please describe.**
I have PDFs that are not generated by react-pdf. It would be cool if I could inject them into my react-pdf document.

**Describe the solution you'd like**
Option 1: It would be cool if we could use the image component or a new PDF component that would add the PDF content but also allow me to add other react-pdf components to the page as well so react-pdf could add a header and footer(with correct page numbers) over the top of the injected PDF so it all looked like it belonged together. Option 2: Add a src attribute on the page component that could take a path or a base64 encoded file and just insert the pages raw. It wouldn't be quite as seamless as option 1 but still pretty cool.

**Describe alternatives you've considered**
To my knowledge, the only way to do this today is to use some tool to convert the PDF pages to images and inject them that way. Either that or I would need to use another tool to merge these PDFs after being generated by react-pdf. The downside would be that the footer wouldn't be on the injected pdf pages.

**Additional context**
I don't think so.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.