I want to convert a color pdf to black and white pdf in specific mode I want to convert all text in red or green in black (not in gray).
gs -o output.pdf \
-sDEVICE=pdfwrite \
-dBlackText=true \
-dBlackVector=true \
-sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray \
input.pdf
Next
The art challenges the technology, and the technology inspires the art.
How to convert color pdf to black and white pdf
TOON (Token-Oriented Object Notation)
Token-Oriented Object Notation (TOON) is a compact data format designed to reduce token usage when passing structured information to Large Language Models (LLMs), achieving 30-60% fewer tokens compared to standard JSON.
It simplifies syntax by eliminating unnecessary punctuation and using a more readable structure, making it ideal for applications that frequently interact with LLMs
https://github.com/toon-format/toon
Example:
JSON: (41 Token)
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" }
]
}TOON: (21 token)
users[2]{id,name,role}:
1,Alice,admin
2,Bob,userUser the tool https://toonifyit.com/
F-Droid and Fossify
What is F-Droid? F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. The client makes it easy to browse, install, and keep track of updates on your device.
https://f-droid.org/
Here you can download many apps as:
Hot to change the mkv title
Use the following command:
>mkvpropedit old_title.mkv --edit info --set "title=new_title"
Anydesk - Error: Display_Server_Not_Supported
sudo gedit /etc/gdm3/custom.conf
WaylandEnable=false
AutomaticLoginEnable=true
AutomaticLogin=<youruser>
in my case <youruser> is equal to max
Convert jpeg file to pdf
Step 1 - Installa the following package
sudo apt install imagemagick
Step 2 - Use the following command: convert *.jpeg my_pdf.pdf
The command above might yield an “operation not allowed” error. Fortunately, we
can easily fix it by executing:
sudo sed -i 's/^.*policy.*coder.*none.*PDF.\*//' /etc/ImageMagick-6/policy.xml
or better:
sudo gedit /etc/ImageMagick-6/policy.xml
add or change the row at end of the file (just before </policymap>) with the following:
<policy domain="coder" rights="read | write" pattern="PDF" />
PHP: How to extract emails from list file
$pattern = '/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/';
if ($file = fopen("a.vcf", "r")) {
while(!feof($file)) {
$line = fgets($file);
if (preg_match($pattern, $line, $matches)) echo $matches[0]."\n";
}
fclose($file);
} Ho to remove metadata from a PDF
sudo apt install mat2
mat2 filename.pdf # you will now end up with a file called filename.cleaned.pdf
mat2 --inplace filename.pdf # this will overwrite original file with the new one, effectively removing the original file
mat2 --show filename.pdf # this will show the metadata that will be removed, if any (similar to dry run)










