From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18103 Path: news.gmane.org!.POSTED!not-for-mail From: John MACFARLANE Newsgroups: gmane.text.pandoc Subject: Re: docx -> markdown: image width and height doesn't respect --dpi? Date: Mon, 28 Aug 2017 17:13:10 -0700 Message-ID: <20170829001310.GA75750@protagoras.berkeley.edu> References: <692f87e9-d992-4d10-a29a-77165f5d5771@googlegroups.com> <20170828145732.GI57370@Johns-MacBook-Pro.local> <591842f3-2fcf-4a1b-b031-9b2c4f8dad05@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed X-Trace: blaine.gmane.org 1503965595 18155 195.159.176.226 (29 Aug 2017 00:13:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2017 00:13:15 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBG7DSLGQKGQEMCQUGXY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 29 02:13:10 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-io0-f186.google.com ([209.85.223.186]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmU9V-0004R3-DD for gtp-pandoc-discuss@m.gmane.org; Tue, 29 Aug 2017 02:13:09 +0200 Original-Received: by mail-io0-f186.google.com with SMTP id e39sf700054ioj.1 for ; Mon, 28 Aug 2017 17:13:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1503965596; cv=pass; d=google.com; s=arc-20160816; b=fTGSLwz8QteZ9a4n6C5LaAsGbhCQxNry7ZsM2pRIWp1ipiTNCiCtgY0H3XIPUYHUzq RIJ4oZUR2aWu9ANaukd137IaGwjAIkYsLxeA1gRrg8oGrM51Za3z7jyfis3wz3Ebmu4v bf3kv7JPbaLpx3x0N1e/uCzFF8/yr499fnxRtirZKa/6kWtNBhSCSPNinO+o3oSHbwLW XyluX7WmYGTDj0Aj+TdZrxkd84J6ZhpCNYUWfW/ix2smhaiE7i/Alb+mLPZlutho8e3/ 36zlyZBXkjzvN+gA2xnlyzNJv2p5huvs+XyUXbpseW8rSZfD9JugMqGG4HXdNxfYFAAQ ihQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :date:from:arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=OSHajj06WltpjvbyQBlELEi58xL4RYF6R/ZiFP2Kp0o=; b=QhDu6WvTAxKhG9LcVJ4Xn+Xl/ODjIiwkJ/YLdlYDFdXa9TEHA8yyvrGFY9VdbUrQBY ZCdKzTj+n1+t+1PqwVVPB8EF+8tnhzGO7r5gqUB0Yy5Ld/diHVsHlkbWTntgdRyqHdND EnCmHvJjt/on44NLD5Rhsj+A6E/BSPTDb4V0bA493XdTXVZ4hhlGFF84EFLSYU+tOhRF 3sS38AjG9jxKJ41OFnwxNqvd5QsM4BVYnKR6fHvzVCZVzeB1wuz2uFb82nPPzjkAoOk4 P3AIbc12Ohx91Kcu5WRp7RZJdj75H4b54HtsOnkDICTsmqa9jO0rkz2gKCfnomZh5paG ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mFjtQq3x; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=OSHajj06WltpjvbyQBlELEi58xL4RYF6R/ZiFP2Kp0o=; b=Y/8cGUZfXjpHMFp2XwFr19PMbw+KD0jqQilaHc5nUd3uWBVKpRsVvKWXrcUYj2Q1oQ gzA3zjqA4WyWQgnDEjueREph0awlZAU+p4H5OEnB19BEd0ODE/O1QhkVPsBOpFb262HS 1rdtv+160hJj+XnEu0zqmwAPj7zyoK5BePXa9pdAEsofbknBcswgdIE3XxNCBp6vWoXh Qnj+9p+Q809E3+AqeZ518EAXAQeDtyQcS5xxDEkVSzfbgX5S6bfx4a0lS+HdCW4i5EOq zyxe3KvGZrPZ5VpNTuFjmCAQbdamMWOwTNVIDpv9wFx8/21knQxcnHnccOSHilxE24WD AhSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=OSHajj06WltpjvbyQBlELEi58xL4RYF6R/ZiFP2Kp0o=; b=AQhsVvtS+y9cnufYMoryYHphp63g9r48pAwl20TGYgrnkNhO6G9aVMQPbMU9kNJaEy xf7m9nzKZfWBQuhMRTQ1oZtcCPHniimmSXXlcnz8V199aQVIoKFBgw5vdTXq9WKRxcuw 4bMN9IErX+YVdHMnKvaJ4sPj5uoVOalgSwvvEjrC5EFvAFW15DyttdKA+0MQ6viB7W3l 9zGd8zuUH11OpsaaVtHcrdbc+6dzZEDUzFi2v7ziCxYDWIzTfATb9e1LLqYFLyB+0Zwi cbLQEzh3xieUPgaTb2U/q5VDMlOJplr5q+SNDnsdrQ3gRtlRzIioaGb42ZrPnIiWAOLQ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5ju1A5+E5NEbk0uFbugf0jXux2v3xo4MjqyUrNEmOIQBIMkvIkB OqwkGf+yc34pyA== X-Received: by 10.36.4.216 with SMTP id 207mr14585itb.7.1503965596272; Mon, 28 Aug 2017 17:13:16 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.36.243.65 with SMTP id t1ls133815iti.14.gmail; Mon, 28 Aug 2017 17:13:15 -0700 (PDT) X-Received: by 10.36.190.194 with SMTP id i185mr1618168itf.3.1503965595573; Mon, 28 Aug 2017 17:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503965595; cv=none; d=google.com; s=arc-20160816; b=kFSi+Wrn0z1zdW/LKS/h/0M3B0lPdQGzCH89PINgmqwSPxlemlZ2ZkacZv3wd0rlcl pB2+2G88hObquIXv75xgvUqQ14AC0xLyqTtu3O2V/lX9W0Ru7d3sL6ZBROsUA0kaVVrc M4DiU8zM8TFrai/u6isR6fI8k6T8p2h46ZLtrx3fk/nBJZjSPwWPAj2ccEJyb/w1un11 Krc9HU4/VxZ9hY3cN70FewasqCWnDVibG/Txj+T5oi8SvxDtA8dFqrrAV06XFHXmoUMF Hjq1VqAEf51juCFj9XQEgVEjdN/Lw6IAqe2S+IWYu469Iaok6MVDqEMqFgElBjT8eYpJ l/QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:date:from:dkim-signature :arc-authentication-results; bh=Nc9zBUe/xZ/gW5c6dTEPY68c3JwRZJT9OKy70Vrqxdw=; b=D4jAUC1mJzNsle0ijtxj2syjLg88XJDjGuq6wJEO8K92Xpovg9Bf4ztyfNYYUU/3u6 jkBM+ALiUrg4yymyy511eB0ZEUOyZHNuyW90tcB7q4qyOm3C5elzIYq1ikFaiRo4JXGG ZRlObjWXsQYktX2SchOCzjhIeZkS6rD26ivweAr++uv9ddxPmHIm5gcpwImCFLQDQ16v /TbRvxO3+E2p6X2hDuOL91s6TFMM/bR0QFgIJjpoDE4qtpSW4K/ea42nQuPxY1XcpHnk ihWfsVf7iZ3tM5kh3G82slcQovAschNUZ30cf9RJajWyA+UzQb8ax2PCCl+clIVZITME ZwnA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mFjtQq3x; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com. [2607:f8b0:400e:c05::230]) by gmr-mx.google.com with ESMTPS id a28si274357pfe.16.2017.08.28.17.13.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 17:13:15 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::230 as permitted sender) client-ip=2607:f8b0:400e:c05::230; Original-Received: by mail-pg0-x230.google.com with SMTP id t3so5951951pgt.0 for ; Mon, 28 Aug 2017 17:13:15 -0700 (PDT) X-Received: by 10.98.42.2 with SMTP id q2mr2163490pfq.61.1503965594888; Mon, 28 Aug 2017 17:13:14 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id 62sm2137734pfw.34.2017.08.28.17.13.13 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 17:13:13 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id EC7F7A1C5; Mon, 28 Aug 2017 20:13:02 -0400 (EDT) Content-Disposition: inline In-Reply-To: <591842f3-2fcf-4a1b-b031-9b2c4f8dad05-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mFjtQq3x; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:18103 Archived-At: With the dev version of pandoc, when I convert this to Markdown I get: > ![MacSSD:Users:kajohnson:Dropbox:Kinetics Book:Chapter 2:Table > 2-1.png](foo/media/image1.png){width="4.616858048993876in" > height="2.5in"} So the Markdown writer doesn't convert the size to pixels; if it's doing that for you, the behavior has been changed. +++ Thomas Blom [Aug 28 17 08:57 ]: > This is an excerpt from the document in question, which contains an > image sized to be 4.65 inches wide, and results in a pixel width of 443 > no matter what --dpi I specify. The image is included in a block-quote > section, which we use when we want to ident things because that is one > of the few styling options that come across in markdown, but omitting > this doesn't affect the width of the image. > Thanks! > On Monday, August 28, 2017 at 9:57:43 AM UTC-5, John MacFarlane wrote: > > Can you give us a simple docx file to test with? > +++ Thomas Blom [Aug 27 17 20:21 ]: > > Hi, > > I convert docx to markdown using pandoc 1.19.2.1 on OSX 10.12 > with > > pandoc -t markdown_strict --dpi=128 --extract-media=images > mydoc.docx > > -o [1]mydoc.md > > I find that the image sizes in the markdown appear to be based > on a > > 96dpi image resolution no matter what --dpi I specify, and also > no > > matter the meta-data in the files embedded in the (word for mac > 2011) > > document (PNG, 144dpi). > > For example, one image in Word has been sized by the author to > be > > ~4.65inches wide. The resulting markdown for this image > specifies a > > width of 443 pixels. So I see that markdown is using a dpi of > 443/4.65 > > =~ 96 regardless of efforts on my part to change this. > > I would like to adjust this because the images appear smaller at > this > > pixel size than the same images in Word. I can of course write > a > > post-processing script to adjust sizes on the markdown document, > but > > would prefer to avoid. It seems like the --dpi option makes > sense to > > address my situation? > > Thanks, > > Thomas Blom > > > > -- > You received this message because you are subscribed to the Google > Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [4]https://groups.google.com/d/msgid/pandoc-discuss/591842f3-2fcf-4a1b- > b031-9b2c4f8dad05%40googlegroups.com. > For more options, visit [5]https://groups.google.com/d/optout. > >References > > 1. http://mydoc.md/ > 2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 4. https://groups.google.com/d/msgid/pandoc-discuss/591842f3-2fcf-4a1b-b031-9b2c4f8dad05-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > 5. https://groups.google.com/d/optout