Answer the question
In order to leave comments, you need to log in
Analogue of the % symbol from cmd to powershell
Good afternoon.
When passing a parameter to Imagemagic's external utility to convert a multi-page .pdf to .tiff, only the first page is converted. While looking for a solution, I came across this code:
convert original.tif output%d.tif
$convert = 'C:\Program Files\ImageMagick-6.8.2-Q16\convert.exe'
$one = Get-Item '.\default.pdf'
$one
& $convert -density 200 -compress group4 $one 'c:\%d.tiff'
Answer the question
In order to leave comments, you need to log in
Problem solved.
We need to edit the delegates.xml file in the Imagemagic directory. Alpha channel processing section.
<delegate decode="ps:alpha" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pnmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
It is this method of splitting a multi-page Pdf into pages that is indicated here. It seems like the convert.exe utility itself understands that it is necessary to extract all the pages in a cycle. Therefore, I sin on this symbol.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question