Problem when exporting an PDF

1 Answer 76 Views
PDF Processing
Jeremy
Top achievements
Rank 1
Jeremy asked on 02 May 2022, 12:46 PM

Hello, i'm trying to use kendo react pdf for my chrome extension, im using :

"@progress/kendo-drawing": "^1.16.3",
"@progress/kendo-licensing": "^1.2.2",
"@progress/kendo-react-pdf": "^5.2.0",

When i try to export like this:

const PDFtester = () => {
const pdfExportComponent = React.useRef(null);

const exportPDFWithComponent = () => {
if (pdfExportComponent.current) {
pdfExportComponent.current.save();
}
};

return (
<div>
<div style={styles.switchButton}>
<div className="setting-button justify-content-center">
<input onClick={exportPDFWithComponent} id="check-light-dark" className="ml-2"
type="button" value="Download stats" style={styles.font4}/>
</div>
</div>
<div style={stylesHide.visuallyhidden}>
<PDFExport
ref={pdfExportComponent}
paperSize="A4"
fileName="Narval Report"
title="Narval Report"
>
<img src={ReactLogo} style={styles.img}/>
<h2 style={styles.font}>
Narval
</h2>
</PDFExport>
</div>
</div>
)
}

All the metadata of my saved document is weird characters: "þÿ"

i dont know why... so is u have a solution..

 

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 03 May 2022, 04:00 PM

Hello, Jeremy,

I assume that the issue occurs as the required fonts are not loaded.

The PDF export requires loading fonts that will have specific symbols:

https://www.telerik.com/kendo-react-ui/components/drawing/pdf-output/embedded-fonts/

Please try loading a font that has these symbols and advise if the issue still occurs.

Does this behavior occur only when you are using the chrome extension or even when you export it without? Can you provide more information on which extension you are using?

I hope this helps.

Regards, FilipProgress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PDF Processing
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or