* [gentoo-user] Off topic: - imagemagic command line, strange behaviour
@ 2023-12-29 2:46 thelma
2024-01-03 16:09 ` Florian Gamböck
0 siblings, 1 reply; 3+ messages in thread
From: thelma @ 2023-12-29 2:46 UTC (permalink / raw
To: Gentoo mailing list
I'm trying to remove grey background from a pdf file, but on windows.
The document contains some grey scale fonts that I want to retain.
Running on windows, via Command line:
magick convert -density 300 document.pdf -fuzz 45% -fill white +opaque black converted_document.pdf
Works, the text is retained including grey-scale font.
But running same command from a bat file, the grey-scale font is removed.
@echo off
cd "C:\Users\Server\Desktop\"
magick convert -density 300 document.pdf -fuzz 45% -fill white +opaque black converted_document.pdf
pause
--
Thelma
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] Off topic: - imagemagic command line, strange behaviour
2023-12-29 2:46 [gentoo-user] Off topic: - imagemagic command line, strange behaviour thelma
@ 2024-01-03 16:09 ` Florian Gamböck
2024-01-03 18:56 ` thelma
0 siblings, 1 reply; 3+ messages in thread
From: Florian Gamböck @ 2024-01-03 16:09 UTC (permalink / raw
To: gentoo-user
On 2023-12-28 19:46, thelma@sys-concept.com wrote:
>@echo off
>cd "C:\Users\Server\Desktop\"
>magick convert -density 300 document.pdf -fuzz 45% -fill white +opaque black converted_document.pdf
>pause
Just a wild guess without looking too deep into it: Might the "%" be a
special character in a Batch file, being interpreted as some sort of
variable? Can you escape it, maybe putting the whole "45%" in quotes?
Kind regards
FloGa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] Off topic: - imagemagic command line, strange behaviour
2024-01-03 16:09 ` Florian Gamböck
@ 2024-01-03 18:56 ` thelma
0 siblings, 0 replies; 3+ messages in thread
From: thelma @ 2024-01-03 18:56 UTC (permalink / raw
To: gentoo-user
On 1/3/24 09:09, Florian Gamböck wrote:
> On 2023-12-28 19:46, thelma@sys-concept.com wrote:
>> @echo off
>> cd "C:\Users\Server\Desktop\"
>> magick convert -density 300 document.pdf -fuzz 45% -fill white +opaque black converted_document.pdf
>> pause
>
> Just a wild guess without looking too deep into it: Might the "%" be a special character in a Batch file, being interpreted as some sort of variable? Can you escape it, maybe putting the whole "45%" in quotes?
>
> Kind regards
>
> FloGa
I got this one.
Yes, you are correct changing "45%" to "45%%" solved the problem.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-03 18:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 2:46 [gentoo-user] Off topic: - imagemagic command line, strange behaviour thelma
2024-01-03 16:09 ` Florian Gamböck
2024-01-03 18:56 ` thelma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox