Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix issues with firefox display

Amruth Pillai4b3b4fb84381
diff --git a/src/components/App/App.js b/src/components/App/App.js
index d06035f53..3ebb99a70 100644
--- a/src/components/App/App.js
+++ b/src/components/App/App.js
@@ -32,7 +32,7 @@ const App = () => {
<div className="h-screen overflow-hidden grid grid-cols-5 items-center">
<LeftSidebar />
- <div className="z-0 h-screen col-span-3 overflow-scroll flex justify-center items-center">
+ <div className="z-0 h-screen col-span-3 flex overflow-scroll justify-center items-center">
<div id="page" ref={pageRef} className="shadow-2xl">
{templates.find(x => theme.layout.toLowerCase() === x.key).component()}
</div>
diff --git a/src/components/RightSidebar/tabs/Actions.js b/src/components/RightSidebar/tabs/Actions.js
index 865e560c5..d1e8a7672 100644
--- a/src/components/RightSidebar/tabs/Actions.js
+++ b/src/components/RightSidebar/tabs/Actions.js
@@ -25,16 +25,14 @@ const ActionsTab = ({ data, theme, dispatch }) => {
};
const printAsPdf = () => {
- pageElement.current.style.maxHeight = 'fit-content';
+ pageElement.current.style.display = 'table';
pageElement.current.style.overflow = 'visible';
+
html2canvas(pageElement.current, {
- scale: 6,
+ scale: 5,
useCORS: true,
allowTaint: true,
}).then(canvas => {
- pageElement.current.style.maxHeight = '29.7cm';
- pageElement.current.style.overflow = 'scroll';
-
const image = canvas.toDataURL('image/jpeg', 1.0);
const doc = new jsPDF('p', 'mm', 'a4');
const pageWidth = doc.internal.pageSize.getWidth();
@@ -50,6 +48,9 @@ const ActionsTab = ({ data, theme, dispatch }) => {
const marginX = (pageWidth - canvasWidth) / 2;
const marginY = (pageHeight - canvasHeight) / 2;
+ pageElement.current.style.display = 'block';
+ pageElement.current.style.overflow = 'scroll';
+
doc.addImage(image, 'JPEG', marginX, marginY, canvasWidth, canvasHeight, null, 'SLOW');
doc.save(`RxResume_${Date.now()}.pdf`);
});