React-GitHub-Resume icon indicating copy to clipboard operation
React-GitHub-Resume copied to clipboard

Added PDF Generator

Open adnanqazii opened this issue 3 years ago • 8 comments

GitHub Resume Generator

GitHub Flow PR Image

Thank you so much for opening a pull request! :smiley:

Please provide the following information where possible to help the pull request reviewer merge your PR quicker!

Relevant Project Issue Numbers :hash:

Add any related issue numbers from the GitHub project. Append the # symbol before issue numbers.

#63

Involved Project Members :bust_in_silhouette:

Tag any GitHub usernames involved or directly responsible for reviewing the proposed changes. Append the @ symbol before usernames.

@sabesansathananthan

An Explanation of Your Changes :speech_balloon:

I used 'react-to-print' library for this feature. It requires setting ref to desired export/download content which is to be passed when using the library component. Please wait for some seconds before clicking print button for correct pdf generation in case it does not look ok. Followed this tutorial: https://www.freakyjolly.com/react-generate-download-pdf-from-html-page-example-react-to-print-tutorial/

For transilators.

  • [ ] Create a file called README.lang.md in the translations folder. lang means shorten form of your language Refer this site.

  • [ ] Check all the links are working.

  • [ ] Check all the parts are translated.

  • [ ] If about and built-with are not working then inspect the page and copy the href and paste in your file.

  • [ ] Edit the translations/Translations.md adding you language icon/link

  • [ ] Edit the main README.md adding your language icon

image

adnanqazii avatar Oct 16 '21 09:10 adnanqazii

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sabesansathananthan/react-github-resume/7867cz8PqQ6j8bxzmXk8636Hc2Gy
✅ Preview: https://react-github-resume-git-fork-adnanqa-ff9d5e-sabesansathananthan.vercel.app

vercel[bot] avatar Oct 16 '21 09:10 vercel[bot]

I think of different implementations. Once we click the download PDF button it should download automatically. No need to show a print window and alignments are different from the original. Thank you for your try. Can you re-think about this

sabesansathananthan avatar Oct 16 '21 17:10 sabesansathananthan

@sabesansathananthan sure will work on this tomorrow.

adnanqazii avatar Oct 16 '21 18:10 adnanqazii

@sabesansathananthan I have found that Docraptor best supports high quality pdfs but it has limits as as shown. Puppetter is other option but has some lower quality than Docraptor and it may require setting up server apis. What do you suggest? Comparison of tools: https://dev.to/nickpad/modern-html-to-pdf-conversion-31i0 image

adnanqazii avatar Oct 18 '21 12:10 adnanqazii

@sabesansathananthan waiting for you.

adnanqazii avatar Oct 20 '21 16:10 adnanqazii

@sabesansathananthan I have found that Docraptor best supports high quality pdfs but it has limits as as shown. Puppetter is other option but has some lower quality than Docraptor and it may require setting up server apis. What do you suggest? Comparison of tools: https://dev.to/nickpad/modern-html-to-pdf-conversion-31i0 image

This is not fair... I inspired from this repo https://github.com/AmruthPillai/Reactive-Resume.

sabesansathananthan avatar Oct 20 '21 17:10 sabesansathananthan

@sabesansathananthan I have found that Docraptor best supports high quality pdfs but it has limits as as shown. Puppetter is other option but has some lower quality than Docraptor and it may require setting up server apis. What do you suggest? Comparison of tools: https://dev.to/nickpad/modern-html-to-pdf-conversion-31i0 image

This is not fair... I inspired from this repo https://github.com/AmruthPillai/Reactive-Resume.

I think that the repo uses puppeteer with serverless functions.What do you suggest? See here: https://github.com/AmruthPillai/Reactive-Resume/blob/b0bd8c94f3b8e97582c307227f8469aaef2c5ece/functions/index.js

adnanqazii avatar Oct 20 '21 17:10 adnanqazii

@sabesansathananthan I have found that Docraptor best supports high quality pdfs but it has limits as as shown. Puppetter is other option but has some lower quality than Docraptor and it may require setting up server apis. What do you suggest? Comparison of tools: https://dev.to/nickpad/modern-html-to-pdf-conversion-31i0 image

This is not fair... I inspired from this repo https://github.com/AmruthPillai/Reactive-Resume.

I think that the repo uses puppeteer with serverless functions.What do you suggest? See here: https://github.com/AmruthPillai/Reactive-Resume/blob/b0bd8c94f3b8e97582c307227f8469aaef2c5ece/functions/index.js

Yes can you implement that.

sabesansathananthan avatar Oct 31 '21 16:10 sabesansathananthan