<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; CMD/BAT/BASH: jpeg -> pdf]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=8592</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8592&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «CMD/BAT/BASH: jpeg -> pdf».]]></description>
		<lastBuildDate>Sun, 01 Sep 2013 07:03:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=75147#p75147</link>
			<description><![CDATA[<p>ghoctscript умеет, только нужно написать верный ps файл</p>]]></description>
			<author><![CDATA[null@example.com (smaharbA)]]></author>
			<pubDate>Sun, 01 Sep 2013 07:03:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=75147#p75147</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=75060#p75060</link>
			<description><![CDATA[<p>А вот эта программа просто прелесть. Вначале чуть-чуть перевода вступительной части. Описание аргументов поместил под спойлер, без перевода. </p><p><a href="http://www.donationcoder.com/Software/Mouser/MiniCap/index.html">MiniCap</a></p><p><em>MiniCap это маленькое приложение для захвата экрана с хорошей поддержкой командной строки, включая возможность запускать (и затем завершать) приложения, захватывать окна по дескриптору, ID и имени процесса или интерактивно. </em></p><p><em>MiniCap обладает удобным интерактивным режимом захвата, но где действительно ярко себя проявляет MiniCap это его использование в качестве не интерактивной программы из командной строки. </em></p><p>Прелесть в том, что ее работу можно легко контролировать. Радует количество поддерживаемых форматов: .jpg, .gif, .pdf, .png, .bmp, .tiff. То есть при желании можно сразу создать PDF без манипуляций с промежуточными картинками типа JPG. </p><p>Для себя я решил использовать так:<br /></p><div class="codebox"><pre><code>
:: После сохранения изображения завершиться
:: Подождать 3 секунды перед захватом
:: Захватить активное окно
:: Сохранить в файл с заданным именем
MiniCap -exit -sleep 3 -captureactivewin -save &quot;%~1&quot;
</code></pre></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Опции командной строки</div><div class="fancy_spoiler"><p>If run on the commandline without any arguments, MiniCap starts up in interactive capture mode, where you can select the object on screen to capture and then save the file with a filename and format of your choice.</p><p>However, the more common use for MiniCap is in non-interactive commandline mode. You can use the following commandline arguments for non-interactive capture:</p><p>-save &quot;OUTPUTFILENAME&quot;<br />Tells MiniCap to automatically save the captured image using the specified filename, including path, and extension which should include the image format extension of your choice (.jpg, .gif, .pdf, .png, .bmp, .tiff).</p><p>You can use certain fields which will be replaced:<br />$appdir$ - application directory (useful if you want to save snapshot in same directory)<br />$appname$ - application exe name (without path)<br />$nicename$ - nice name of application exe (taken from exe resource)<br />$windowtitle$ - window caption<br />$uniquenum$ - adds unique number to filename to avoid overwriting existing files (number only added when needed to avoid existing file)<br />$uniquenum0$ - adds unique number to filename to avoid overwriting existing files (number ALWAYS added)<br />$datetime$ , $date$ , $time$ - local date/time<br />$dt:%DATEFORMATSTRING$ - where DATEFORMATSTRING is made up from the following:</p><p>%a Abbreviated weekday name<br />%A Full weekday name<br />%b Abbreviated month name<br />%B Full month name<br />%c Date and time representation appropriate for locale<br />%d Day of month as decimal number (01 – 31)<br />%H Hour in 24-hour format (00 – 23)<br />%I Hour in 12-hour format (01 – 12)<br />%j Day of year as decimal number (001 – 366)<br />%m Month as decimal number (01 – 12)<br />%M Minute as decimal number (00 – 59)<br />%p Current locale&#039;s A.M./P.M. indicator for 12-hour clock<br />%S Second as decimal number (00 – 59)<br />%U Week of year as decimal number, with Sunday as first day of week (00 – 53)<br />%w Weekday as decimal number (0 – 6; Sunday is 0)<br />%W Week of year as decimal number, with Monday as first day of week (00 – 53)<br />%x Date representation for current locale<br />%X Time representation for current locale<br />%y Year without century, as decimal number (00 – 99)<br />%Y Year with century, as decimal number<br />%z Time-zone name<br />%Z Time-zone abbreviation</p><p>-closeapp<br />Tells the app that is run to close after screenshot is taken<br />If you don&#039;t specify -closeapp or -killapp then the app will be left running after the app is launched</p><p>-killapp<br />Closes app harshly if it won&#039;t close by normal request</p><p>-sleep #<br />Sleep # seconds before engaging capture</p><p>-capturescreeen<br />Capture current screen</p><p>-capturedesktop<br />Capture entire desktop workspace (all multimonitors if more than one exists)</p><p>-capturerunapp<br />Automatically capture the application specified by a -run argument</p><p>-capturehwnd #<br />Automatically capture the window with the specified handle number (specified in decimal)</p><p>-capturepid #<br />Automatically capture the main window of the application with the specified process id (specified in decimal)</p><p>-captureregion left top right bottom<br />Capture screeen region specified</p><p>-captureregselect<br />Interactive capture of region (traditional style mode -- locked to current screen of multimonitor)</p><p>-captureredregselect<br />Interactive capture of region (red box mode)</p><p>-captureobjselect<br />Interactive capture of object (red box mode)</p><p>-captureappbyname &quot;filename.exe&quot;<br />Find the window of the running exe specified and capture it (specify filename with extension but no path)</p><p>-captureactivewin<br />Capture last active window</p><p>-exit<br />Exit minicap after the screenshot is saved<br />If you don&#039;t specify this then MiniCap will remain open after the capture.</p><p>-scrollcap<br />Use scrolling window capture more</p><p>-setfore<br />Set window to be captured to foreground before capturing</p><p>-client<br />Captures client area of the window, useful when capturing windows which have no borders/titlebar</p><p>-run &quot;APPNAME&quot; [args+]<br />Runs a specific application specified before capturing.<br />All arguments after appname are passed on the commandline to the app, so -run needs to be the last argument you specify</p><p>-runcap &quot;APPNAME&quot; [args+]<br />Same as calling with -run and automatically adds the following arguments for easy use:<br />&quot;-closeapp -exit -sleep 3 -captureapp&quot;<br />Like -run, this needs to be the LAST arguments you specify</p><p>-postrun &quot;COMMANDLINEWITHARGS&quot;<br />runs a program after the image is saved (use $file$ to replace saved image filename in commandline)</p><p>-compress #<br />Set compression quality from 1 to 10 (10 is highest quality and biggest image); default to 8</p><p>-clipimage<br />Copy the image to clipboard after capture</p><p>-clipimagepath<br />Copy the saved image filename (full path) to clipboard after capture</p><p>-bordershadow<br />Add a nice border and shadow to image</p><p>-promptsave<br />Asks user for filename to save immediately after a capture.<br />If combined with a filename specified using -save &quot;FILENAME&quot; then you will be prompted to save as with the filename pre-filled out.</p><p>-resizexp PERCENTAGE<br />resize x dimension to PERCENTAGE% of its original value (y will be scaled to preserve ratio if no y resize value specified)</p><p>-resizeyp PERCENTAGE<br />resize y dimension to PERCENTAGE% of its original value (x will be scaled to preserve ratio if no x resize value specified)</p><p>-resizex WIDTH<br />resize x dimension to exactly WIDTH pixels (y will be scaled to preserve ratio if no y resize value specified)</p><p>-resizey HEIGHT<br />resize y dimension to exactly HEIGHT pixels (y will be scaled to preserve ratio if no y resize value specified)</p><p>-print<br />print the captured image</p><p>-printpreview<br />show a print preview before printing and allow adjustment of margins, etc.</p><p>-setprinter PRINTERNAME<br />sets a specific printer for printing (to get a list invoke -setprinter list); you can use the full name or a substring</p><p>-convert CONVERTMODE<br />CONVERTMODE is from:<br />bwo = Black+White (ordered)<br />bwf = Black+White (floydSteinberg method)<br />bwt = Black+White (local threshold)<br />bwt1 = Black+White (global threshold of 128)<br />bwt2 = Black+White (global threshold of avg pixel)<br />btw3 = Black+White (global threshold set by entropy)<br />gray = Grayscale</p><p>-noaero<br />disables the new aero capture mode even on vista/win7 machines</p><p>-aeroborder THRESHOLD<br />THRESHOLD should be an integer from 0 to 255<br />if set to 0 then no automatic shadow removal/border trimming will take place, and a larger image with the aero shadow will be captured.<br />a higher value, like 200, will attempt to clean up the borders and result in small image dimensions by removing bordering pixels with alpha values smaller than that specified.</p><p>-aerocolor COLORCOMPONENTVALUE<br />COLORCOMPONENTVALUE should be an integer from 0 to 255<br />if you specify 0 you will get a black background when flattening (see below), if 255 then a white background when flattening</p><p>-aeroflatten<br />flattens the area inside the border so that the image has only 2 levels of transparency -- purely transparent outside the border (see option above), and purely opaque inside the border region. the -aerocolor parameter specifies the background color to merge transparency with when flattening.</p><p>-dpi VALUE<br />sets the DPI value in the image properties of the saved image (useful when importing images into MS word, printing, etc.</p><br /><br /><p>Example:<br />MiniCap.exe -save &quot;C:\screen_$appname$$uniquenum$_$date$.jpg&quot; -closeapp -exit -sleep 4 -capturerunapp -run &quot;C:\Program Files\Macromedia\FlashPlayer.exe&quot; &quot;C:\MyMovie.swf&quot;</p><p>MiniCap.exe -capturerunapp -exit -save &quot;D:\desktop.png&quot; -sleep 5 -closeapp -exit -run &quot;C:\WINDOWS\system32\notepad.exe&quot; &quot;C:\WINDOWS\test.txt&quot;</p><br /><p>-save &quot;E:\test.jpg&quot; -runcap &quot;C:\WINDOWS\system32\notepad.exe&quot; &quot;C:\WINDOWS\test.txt&quot;</p></div></div>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Thu, 29 Aug 2013 14:23:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=75060#p75060</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74736#p74736</link>
			<description><![CDATA[<p><strong>Flasher</strong><br />Спасибо. Я ее уже протестировал. Программа хорошая. Буду использовать оба варианта - и jpegtopdf и convert, в зависимости от ситуации.</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Tue, 20 Aug 2013 09:32:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74736#p74736</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74734#p74734</link>
			<description><![CDATA[<p><strong>Rumata</strong><br />Тогда лучше используйте jpegtopdf без Cygwin-ов всяких.<br />Как склеивать картинки в PDF (и не только) разными средствами, включая ImageMagick, я прекрасно знаю, и в этом смысле у меня давно всё налажено. Я лишь даю варианты на выбор.</p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Tue, 20 Aug 2013 09:16:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74734#p74734</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74731#p74731</link>
			<description><![CDATA[<p><strong>Flasher</strong><br />Вопрос стоит именно в конвертировании одна картинка - один документ. </p><p>Если есть необходимость склеить несколько картинок в один файл, то можно использовать тот же ImageMagick:<br /></p><div class="codebox"><pre><code>
convert -adjoin -format pdf file1.jpg file2.jpg output.pdf
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Tue, 20 Aug 2013 08:42:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74731#p74731</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74712#p74712</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>У меня вопрос: а мы говорим не о мультистраничном склеивании картинок в один PDF?</p></blockquote></div><p>Я сначала так и решил, и даже полез было разбираться с Ghostscript, но потом понял, что речь об этом не идёт. Но если здесь будет — тем лучше.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Mon, 19 Aug 2013 21:26:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74712#p74712</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74711#p74711</link>
			<description><![CDATA[<p><strong>alexii</strong><br />У меня вопрос: а мы говорим не о мультистраничном склеивании картинок в один PDF?<br />Если только о одностраничниках, то вариантов масса: демоверсии консольных программ (у кот. главное ограничение - число картинок в&nbsp; одном pdf без штампа), <a href="http://www.jpegtopdf.com/">jpegtopdf</a> и именитая IrfanView (правда она тоже для некоммерческого использования).</p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Mon, 19 Aug 2013 20:54:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74711#p74711</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74710#p74710</link>
			<description><![CDATA[<p><strong>Flasher</strong>, я изначально <a href="http://forum.oszone.net/post-2156099.html#post2156099">смотрел как раз в сторону NConvert</a>, но он бесплатен только «for non-commercial» пользования, а автору вопроса предстояло пользовать сие в своей конторе.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Mon, 19 Aug 2013 20:47:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74710#p74710</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74709#p74709</link>
			<description><![CDATA[<p><a href="http://www.xnview.com/en/nconvert/#downloads">NConvert</a> тоже справляется.<br />Из бесплатных есть ещё такая <a href="http://www.compulsivecode.com/Images/JPEGtoPDF.zip">JPEGtoPDF</a> (увы, на VB.NET).<br />Ещё из консольных знаю 3 платника, напичканных кучей полезных функций. Если надо, дам ссылки.</p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Mon, 19 Aug 2013 20:22:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74709#p74709</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74698#p74698</link>
			<description><![CDATA[<p><strong>alexii</strong><br />Спасибо. Вот и второе решение. Буквально сразу как увидел Ваше сообщение, проверил существование ImageMagick. У меня есть. </p><p>И есть выбор:<br />1. мое предложение - файл меньшего размера, но есть скроллинг (страница выглядит как лист формата А4 с картинкой по середине)<br />2. ваше предложение - файл чуть больше, но страница содержит только одну картинку.</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Mon, 19 Aug 2013 16:27:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74698#p74698</guid>
		</item>
		<item>
			<title><![CDATA[Re: CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74696#p74696</link>
			<description><![CDATA[<p>Я делал нечто подобное, но под Windows, с помощью «ImageMagick»:<br /></p><div class="codebox"><pre><code>for %i in (*.jpg) do @&quot;%ProgramFiles%\ImageMagick-6.3.4-Q8\convert.exe&quot; &quot;%~fi&quot; -format pdf &quot;%~dpni.pdf&quot;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Mon, 19 Aug 2013 15:02:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74696#p74696</guid>
		</item>
		<item>
			<title><![CDATA[CMD/BAT/BASH: jpeg -> pdf]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=74694#p74694</link>
			<description><![CDATA[<p>Понадобилось мне конвертировать картинки в формате JPG в PDF. Предполагается наличие соответствующих предустановленных утилит, например, из пакета <a href="http://cygwin.com/">Cygwin</a> в случае использования на системе win32. </p><p>Может быть задача и глупая и простая, но, тем не менее, не могу не поделиться. Возможно, кто-то из коллег знает лучшее решение - буду рад увидеть ваше решение:</p><div class="codebox"><pre><code>
jpg2pdf ()
{
    local jpg=&quot;${1:--}&quot;;
    local pdf=&quot;${2:--}&quot;;
    jpegtopnm &quot;$jpg&quot; | pnmtops -noturn | ps2pdf - &quot;$pdf&quot;
}
</code></pre></div><p>Применение:<br /></p><div class="codebox"><pre><code>jpg2pdf filename.jpg filename.pdf</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Mon, 19 Aug 2013 14:38:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=74694#p74694</guid>
		</item>
	</channel>
</rss>
