PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Apr 19, 2024 11:34 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Greyscale Images.
PostPosted: Thu Apr 30, 2015 11:14 am 
Offline

Joined: Tue Apr 28, 2015 5:27 am
Posts: 8
How can i make the color images,black and white(grey scale),in PDFSharp?
Have any idea.


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Thu Apr 30, 2015 11:32 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

Convert color images to gray scale using .NET functions before you pass them to PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Thu Apr 30, 2015 11:35 am 
Offline

Joined: Tue Apr 28, 2015 5:27 am
Posts: 8
Can you suggest good piece of code for it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Wed Sep 21, 2016 3:30 pm 
Offline

Joined: Wed Sep 21, 2016 3:27 pm
Posts: 2
Do you have a recommended process for converting an entirely color PDF into a black and white PDF using PDFSharp?

I know this is basic but having trouble finding the information.

Thanks,

John


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Wed Sep 21, 2016 4:05 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi, John!
jvlinton wrote:
Do you have a recommended process for converting an entirely color PDF into a black and white PDF using PDFSharp?
I don't know how to do that.
Maybe a PDF expert can shed some light ...

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Tue Oct 04, 2016 3:24 pm 
Offline

Joined: Tue Aug 02, 2016 9:56 am
Posts: 40
Location: Amsterdam, The Netherlands
jvlinton wrote:
Do you have a recommended process for converting an entirely color PDF into a black and white PDF using PDFSharp?

I know this is basic but having trouble finding the information.

As far as I know, this is not basic at all. You would have to process the contents of each page, looking for colour operations, and change those to equivalent operations using greyscale (or even black & white). Also, you would need to replace each image with a greyscale version and update the ColorSpace entry in its metadata. As PdfSharp does not provide access to inline images, you cannot convert those at the moment.

For starters, you could try http://greyscalepdf.com/ and see what it changes in the processed PDF. It apparently uses Ghostscript for the conversion. But I've noticed that that site does not always convert everything to greyscale; sometimes it leaves a bit of colour.

_________________
Gerben Vos
Developer


Top
 Profile  
Reply with quote  
 Post subject: Re: Greyscale Images.
PostPosted: Tue Nov 22, 2016 7:21 pm 
Offline

Joined: Wed Sep 21, 2016 3:27 pm
Posts: 2
I thought PDFSharp listed it on its old site but I don't see any documentation/support for this feature.

Someone else said there's a Windows library that does the conversion apart from PDF.

Not sure...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 253 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group