-
Notifications
You must be signed in to change notification settings - Fork 163
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
Added download feature #90
base: master
Are you sure you want to change the base?
Conversation
Why do we have so many new dependencies? I was talking about |
I removed all the extra packages i used and now i am only using jspdf and html2canvas. |
Okay, that makes sense, thanks for clarifying. Let me see if I can fix the conflicts... |
src/components/Rezume/Rezume.js
Outdated
//function for download as png | ||
const downloadAsPNG =()=>{ | ||
const rezumeContainer = document.getElementById('rezume'); | ||
html2canvas(rezumeContainer).then(function(canvas) { | ||
var link = document.createElement("a"); | ||
document.body.appendChild(link); | ||
link.download = "rezume.png"; | ||
link.href = canvas.toDataURL("image/png"); | ||
link.target = '_blank'; | ||
link.click(); | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the whole file, please kindly indent the content in 2 space mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the prettier settings? 😁
No wait. Lemme check and try helping out with the conflict resolution... |
Hey... Can you try cherry-picking and fixing it? |
const downloadAsPNG = () => { | ||
const rezumeContainer = document.getElementById("rezume"); | ||
html2canvas(rezumeContainer).then(function (canvas) { | ||
var link = document.createElement("a"); | ||
document.body.appendChild(link); | ||
link.download = "rezume.png"; | ||
link.href = canvas.toDataURL("image/png"); | ||
link.target = "_blank"; | ||
link.click(); | ||
}); | ||
}; | ||
//function for download as jpeg | ||
const downloadAsJpeg = () => { | ||
const rezumeContainer = document.getElementById("rezume"); | ||
html2canvas(rezumeContainer).then(function (canvas) { | ||
var link = document.createElement("a"); | ||
document.body.appendChild(link); | ||
link.download = "rezume.jpeg"; | ||
link.href = canvas.toDataURL("image/jpeg"); | ||
link.target = "_blank"; | ||
link.click(); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need these two anyway. We can remove it.
{Summary} | ||
</p> | ||
</div> | ||
<div className="py-5 download-btns"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering if we can keep the download button on the navbar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue has been stale for many days now, any update on the progress would be appreciated @Neha9849
Issue that this pull request solves
Closes: #86
Proposed changes
I added 3 buttons - Download as png, Download as jpeg and Download as pdf
Types of changes
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that applyScreenshots
Please attach the screenshots of the changes made in case of change in user interface
Other information
Any other information that is important to this pull request