Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
44.03k stars 3.59k forks source link

[Feature Request]: Invert PDF colors for printing #1452

Closed IkelAtomig closed 2 days ago

IkelAtomig commented 4 months ago

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 :

The Above three are from Adobe's Accessibility settings.


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

Hashim0510 commented 1 month ago

is this still needs to work on ?

IkelAtomig commented 1 month ago

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>

Frooodle commented 1 month ago

Not been done yet

Hashim0510 commented 1 month ago

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 ?

Frooodle commented 1 month ago

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

Hashim0510 commented 1 month ago

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

IkelAtomig commented 1 month ago

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>

Hashim0510 commented 1 month ago

please assign to me.

IkelAtomig commented 1 month ago

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>

Hashim0510 commented 1 month ago

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

IkelAtomig commented 1 month ago

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>

Hashim0510 commented 1 month ago

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

Hashim0510 commented 4 weeks ago

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

IkelAtomig commented 4 weeks ago

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>

Hashim0510 commented 3 weeks ago

Raised the PR. Please review and comment it!

Frooodle commented 3 weeks ago

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 commented 3 weeks ago

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

Hashim0510 commented 3 weeks ago

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.

Frooodle commented 3 weeks ago

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!

Hashim0510 commented 3 weeks ago

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

IkelAtomig commented 2 weeks ago

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