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
I need to convert colored PDF documents to grayscale using Telerik [PdfProcessing](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/overview) in an ASP.NET Core (.NET 9) environment. The provided Telerik documentation uses `System.Windows.Media` and `System.Windows.Media.Imaging`, which are unavailable in .NET Core. I need an alternate approach compatible with my environment.
21
+
Convert colored images in PDF documents using Telerik [PdfProcessing]({%slug radpdfprocessing-overview%}) in an ASP.NET Core (.NET 9) environment.
22
+
23
+

22
24
23
-
This knowledge base article also answers the following questions:
24
-
- How to process PDFs to grayscale in ASP.NET Core (.NET 9)?
25
-
- How to convert images in PDFs to grayscale using Telerik PdfProcessing?
26
-
- How to handle PDF image transformations in non-Windows environments?
27
25
28
26
## Solution
29
27
30
28
To convert colored PDFs to grayscale in ASP.NET Core (.NET 9), follow these steps:
31
29
32
-
1. Use the Telerik PdfProcessing library to load and manipulate PDF content.
30
+
1. Use the Telerik [PdfProcessing]({%slug radpdfprocessing-overview%}) library to load and manipulate PDF content.
33
31
2. Replace the image processing logic with a custom implementation using `System.Drawing`.
34
32
35
33
Here is the complete code example:
@@ -132,12 +130,6 @@ class Program
132
130
}
133
131
```
134
132
135
-
### Key Notes:
136
-
- The image processing logic is implemented using `System.Drawing` to convert images to grayscale.
137
-
- This approach works in non-Windows environments and is compatible with ASP.NET Core.
-[Convert Color PDF to Black and White](https://docs.telerik.com/devtools/document-processing/knowledge-base/convert-color-pdf-to-black-and-white-telerik-document-processing)
0 commit comments