Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

[Feature Request]: Invert PDF colors for printing

Open IkelAtomig opened this issue 1 year ago • 19 comments

Feature Description

Upon using this option, it would invert the color of the pdf document like a negative in Old microfilms used in camera.

It could be either of Full inversion or as follows :

  • Black text on White
  • Green, Yellow and White Text on Black
  • Custom Color for Background and Text

The Above three are from Adobe's Accessibility settings.


  • [ ] Pure Inversion
  • [ ] Inversion based on Color Profiles

Why is this feature valuable?

This is a really needed feature, if somebody want to print, say, a powerpoint presentation file exported as PDF.

It's Colors will be printed as Charcoal Black during printing. While inverting the colors, The text which is the main material is turned black and background to white.

This saves a lot of valuable ink and prevents the toner from running out quickly.

While adobe has this but has the feature named as Print Production where you adjust it but paywall-ed. Which is used to print in this way.

Adobe primarily has this inversion for viewing inverted only not printing.

Suggested Implementation

Upon research for my personal use case, I found this project which is very useful in Full inversion.

But I don't know if it will be supporting other modes, I stated though. Those are necessary in case inversion doesn't work out and it could help the user as backup to adjust the color profiles for inversion.

Additional Information

No response

No Duplicate of the Feature

  • [X] I have verified that there are no existing features requests similar to my request.

IkelAtomig avatar Jun 13 '24 10:06 IkelAtomig

is this still needs to work on ?

Hashim0510 avatar Sep 24 '24 08:09 Hashim0510

Indeed, It is a very useful feature and saves ink. People just don't know it exists.

24 Sept 2024, by @.***:

is this still needs to work on ?

— Reply to this email directly, > view it on GitHub https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2370643335> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AYJXNKGQ5TH6C3GO6WGBAYLZYEQYLAVCNFSM6AAAAABJIDE47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZQGY2DGMZTGU> . You are receiving this because you authored the thread.> Message ID: > <Stirling-Tools/Stirling-PDF/issues/1452/2370643335> @> github> .> com>

IkelAtomig avatar Sep 24 '24 09:09 IkelAtomig

Not been done yet

Frooodle avatar Sep 24 '24 12:09 Frooodle

few queries : Customization for color of background and text should be given to user ? client side and server side needs to done for this feature on this single ticket ?

Hashim0510 avatar Sep 24 '24 12:09 Hashim0510

Colour is so visual that it makes sense for it to be client only We already have a contrast/ colour feature existing Would be enhancement for that

Frooodle avatar Sep 24 '24 13:09 Frooodle

What I have understood is that, It should invert the color of everything in pdf including texts and images. right ? For example :

Input pdf :
INPUT-tets-invertColor.pdf

OUTPUT should look like : output-test-invert-colors.pdf

Hashim0510 avatar Sep 25 '24 09:09 Hashim0510

Yes, exactly.

Sep 25, 2024, by @.***:

What I have understood is that, It should invert the color of everything in pdf including texts and images. right ? For example :

Input pdf :

INPUT-tets-invertColor.pdf https://github.com/user-attachments/files/17128191/INPUT-tets-invertColor.pdf

OUTPUT should look like :

output-test-invert-colors.pdf https://github.com/user-attachments/files/17128209/output-test-invert-colors.pdf

— Reply to this email directly, > view it on GitHub https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2373485295> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AYJXNKER7CVEF3ETCYZ2JOLZYJ3SRAVCNFSM6AAAAABJIDE47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGQ4DKMRZGU> . You are receiving this because you authored the thread.> Message ID: > <Stirling-Tools/Stirling-PDF/issues/1452/2373485295> @> github> .> com>

IkelAtomig avatar Sep 25 '24 09:09 IkelAtomig

please assign to me.

Hashim0510 avatar Sep 25 '24 12:09 Hashim0510

It needs to support various color pallets too for other colors in case it doesn't work well by default as a contingency plan. 

25 Sept 2024, by @.***:

please assign to me.

— Reply to this email directly, > view it on GitHub https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2373939002> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AYJXNKALU5XXNCY24AXAJULZYKTPZAVCNFSM6AAAAABJIDE47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTHEZTSMBQGI> . You are receiving this because you authored the thread.> Message ID: > <Stirling-Tools/Stirling-PDF/issues/1452/2373939002> @> github> .> com>

IkelAtomig avatar Sep 25 '24 12:09 IkelAtomig

In that case, do I need to find out which are all colors doesn't work and should have various options for those colors ? @IkelAtomig

Hashim0510 avatar Sep 25 '24 15:09 Hashim0510

I would say, Just install Adobe Acrobat reader and use the color pallets listed. It is about a number of three, of I remember correctly. 

25 Sept 2024, by @.***:

In that case, do I need to find out which are all colors doesn't work and should have various options for those colors ? > @IkelAtomig https://github.com/IkelAtomig

— Reply to this email directly, > view it on GitHub https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2374377326> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AYJXNKHPPDBY3S3GQJVIQV3ZYLHEZAVCNFSM6AAAAABJIDE47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZUGM3TOMZSGY> . You are receiving this because you were mentioned.> Message ID: > <Stirling-Tools/Stirling-PDF/issues/1452/2374377326> @> github> .> com>

IkelAtomig avatar Sep 25 '24 16:09 IkelAtomig

I don't see that exists in adobe, can you please direct me towards absolute @IkelAtomig

Hashim0510 avatar Sep 25 '24 16:09 Hashim0510

image

From the issue description and @IkelAtomig mentioned in above comment, I can see the feature from adobe. Refer to the feature of Adobe from the above pasted image.

features on adobe are :

  1. changing text and background (yellow, green, white)

  2. custom color option for text and background

Do you expect me to replicate the same with full inversion added to that ? let us dispel this misconception @IkelAtomig @Frooodle

Hashim0510 avatar Sep 25 '24 17:09 Hashim0510

Indeed.

25 Sept 2024, by @.***:

image.png (view on web) https://github.com/user-attachments/assets/3e1f6e36-bf6c-45a5-9c4d-6b0c34271920

From the issue description and > @IkelAtomig https://github.com/IkelAtomig> mentioned in above comment, I can see the feature from adobe. Refer to the feature of Adobe from the above pasted image.

features on adobe are :

changing text and background (yellow, green, white)

custom color option for text and background

Do you expect me to replicate the same with full inversion added to that ? let us dispel this misconception > @IkelAtomig https://github.com/IkelAtomig> > @Frooodle https://github.com/Frooodle

— Reply to this email directly, > view it on GitHub https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2374720034> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AYJXNKFPHKKAKQQ2GSKGW5LZYLWX7AVCNFSM6AAAAABJIDE47GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZUG4ZDAMBTGQ> . You are receiving this because you were mentioned.> Message ID: > <Stirling-Tools/Stirling-PDF/issues/1452/2374720034> @> github> .> com>

IkelAtomig avatar Sep 26 '24 01:09 IkelAtomig

Raised the PR. Please review and comment it!

Hashim0510 avatar Oct 03 '24 05:10 Hashim0510

Colour is so visual that it makes sense for it to be client only We already have a contrast/ colour feature existing Would be enhancement for that

I notice the PR you raised is server side not client? I don't think many people would want to use a colour editor without visualising the changes etc

Frooodle avatar Oct 03 '24 08:10 Frooodle

However still seems good so happy to merge, but I think it would have made more sense to be client side... It could be this code gets replaced down the line etc

Frooodle avatar Oct 03 '24 08:10 Frooodle

https://github.com/Stirling-Tools/Stirling-PDF/issues/1452#issuecomment-2374720034

As per discussion, I did this feature. Your comment on enhancement for the contrast feature to visually exist when client changes was acknowledgeable. But the issue title and whatever the discussion before implementation was around the the invert color, and adobe's custom color and high contrast color feature. I was confirming it before implementation, whatever I was going to do. I hope misconceptions on issue title and clear goals for features should be taken care of in the future.

Hashim0510 avatar Oct 03 '24 09:10 Hashim0510

I believe we did discuss that it should be client side within this chat, I have quote referenced it earlier Regardless greatly appreciate the work!

Frooodle avatar Oct 03 '24 09:10 Frooodle

I have added the request changes on navbar. html anf en_gb.properties files @Frooodle

Hashim0510 avatar Oct 04 '24 12:10 Hashim0510

It would be very much better to be on client side done than on server as Frooodle suggested.

IkelAtomig avatar Oct 05 '24 08:10 IkelAtomig