You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: knowledge-base/exporting-xlsx-to-pdf-formatting-issues.md
+72-19Lines changed: 72 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,36 +17,89 @@ res_type: kb
17
17
This article demonstrates how to deal with formatting difficulties when exporting an XLSX file to PDF using the RadSpreadProcessing library in .NET Standard.
18
18
19
19
The most common scenario is:
20
-
1. Export an XLSX file to PDF using the RadSpreadProcessing library.
20
+
1.[Export an XLSX file to PDF]({%slug radspreadprocessing-formats-and-conversion-pdf-pdfformatprovider%}) using the RadSpreadProcessing library.
21
21
2. Observe the resulting PDF file with truncated columns or different font.
The limitations of .NET Standard may cause differences in font and text size (text measuring) when converting to PDF format.
26
+
The limitations of .NET Standard may cause differences in the font and text size (text measuring) when converting to PDF format.
27
+
28
+
1\. To address the issue with the size discrepancy, set a [SpreadFixedTextMeasurer]({%slug radspreadprocessing-cross-platform-text-measure%}}) to handle the problem with the size:
25
29
26
-
1.To address the issue with the size discrepancy, set a `SpreadFixedTextMeasurer` to handle the problem with the size:
Please refer to the attached sample project for a complete implementation. Test the solution on your end to verify if it resolves the formatting issue.
using (FileStreamfileStream=File.OpenRead(targetPath))
84
+
{
85
+
using (MemoryStreammemoryStream=newMemoryStream())
86
+
{
87
+
fileStream.CopyTo(memoryStream);
88
+
returnmemoryStream.ToArray();
89
+
}
90
+
}
91
+
}
92
+
93
+
returnnull;
94
+
}
95
+
}
96
+
```
97
+
Now, the font in the exported PDF document is the correct one and the text is not clipped.
46
98
47
-
## Notes
48
-
It is important to note that the limitations of .NET Standard may still result in slight differences in font and text size when converting to PDF format.
-[Troubleshooting Exporting XLSX to PDF in RadSpreadProcessing](https://www.telerik.com/support/kb/document-processing/details/exporting-xlsx-to-pdf-formatting-issues)
Copy file name to clipboardExpand all lines: libraries/radspreadprocessing/formats-and-conversion/pdf/pdfformatprovider.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,6 @@ The result from the export method is a document that can be opened in any applic
69
69
>tip __RadFixedDocument__ is the base class of the __RadPdfProcessing__ library. Additional information on the library and its functionality can be found [here]({%slug radpdfprocessing-overview%}).
70
70
71
71
## See Also
72
-
73
-
*[Import/Load and Export/Save RadSpreadProcessing Workbook]({%slug import-export-save-load-workbook%})
72
+
-[How to Eliminate Formatting Issues when Exporting XLSX to PDF Format]({%slug exporting-xlsx-to-pdf-formatting-issues%}})
73
+
-[Import/Load and Export/Save RadSpreadProcessing Workbook]({%slug import-export-save-load-workbook%})
0 commit comments