From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18643 Path: news.gmane.org!.POSTED!not-for-mail From: albert.krewinkel-stqabkCVF6SGlKaCpJGLJw@public.gmane.org Newsgroups: gmane.text.pandoc Subject: Re: docx to pdf conversion error Date: Mon, 13 Nov 2017 01:19:02 -0800 (PST) Message-ID: <323e407c-d9ae-429a-b951-1dc5b87a624b@googlegroups.com> References: <9256e740-7530-4dc2-9acd-5d14eca6fc07@googlegroups.com> <20171110044412.GI70590@MacBook-Air-2.local> <4710734d-f71c-45c9-b65f-27ebf81e29e1@googlegroups.com> <85643608-a189-4407-8a21-37e5d75074fd@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7303_473399237.1510564742457" X-Trace: blaine.gmane.org 1510564747 14497 195.159.176.226 (13 Nov 2017 09:19:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 09:19:07 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCSYBJUJUAGRBB6HUXIAKGQEMYNGD6A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 13 10:19:02 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot0-f189.google.com ([74.125.82.189]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEAtN-0003Ep-K2 for gtp-pandoc-discuss@m.gmane.org; Mon, 13 Nov 2017 10:18:58 +0100 Original-Received: by mail-ot0-f189.google.com with SMTP id s12sf3623872otc.5 for ; Mon, 13 Nov 2017 01:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=U5xxr8FcgHlL4kOdFrOjnuo9luYvOZKnyq7vg0tGk74=; b=MA0ZjfMhbFOywf/FqkGbDi/emc1/IYULQ0PKL+VBy9/Gx6hMoOUfYAOs0M7qomYKFa M5DJJodXv8JpckIo96evv9MX/0r5vY5N55kcLZc6JjQNICFiIHKz2WLA/NbUfU+4DA7J 3uvwkwtZaoC9Ql/f9oJAlOcajjAlQ+JuMV/M87uyiS+5RlL9z0uu9sGrd+Q91r8+PdYq ygl8QPFSonxKNSlCnMZbNecokQOtkE+mHVwjZ0seC1zHsmU1QGvdNNjTTfl9jhxDtnT1 Tzt4drI82bwA7qpLHzT2c5tEwF9Gv+HyOnVNcHQMGwxPbSz1RAThKL7WIj1WbCOkFXJA Btdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tourstream-eu.20150623.gappssmtp.com; s=20150623; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=U5xxr8FcgHlL4kOdFrOjnuo9luYvOZKnyq7vg0tGk74=; b=vK6LEKyn2GHjSn5mS1qHFA6u0/+qPCtBtb1ISVYE6Gl6dUDzhviYDA4EKcLazK+8mI wlFFfqjWKgzpts2KLn8e16zHjUoWJ8Z/ur0b4TDx/c8kCj/R+G+glDLVlRzrWd4bGfUX Edr+v59+nFMOzQ/eNLc/Ti9TndoQVjjV18ZA1ZsWIM2TDTOYxeWC1WNHghrqMoBlNHQw DYk5QFe/F2MwELnIA6uReJ1zQWQMVUe48cnQhf57d/Y+mddExGSNoACgJKgIq2Gl3uue /pSqZSiHht7IL4v2LDCGXZuvmFCl6INmuZgBzB5tOh2Va4ZyYQiX0nTWtd9XCjNwFjEn WF6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=U5xxr8FcgHlL4kOdFrOjnuo9luYvOZKnyq7vg0tGk74=; b=YAinJbuSlrZC6QQbZYvIerhfEMB+Sj4sGF241TZGOLg/cTfUvbOgdB5Iofb5F+/BUZ WG3vulJnJzNCFQHXpqjmezSMqA52CDi8UgskTcHQ6GkUsnaHpfwDAbkNzxkI3zIX4PTP myc3D56vwS3l+5LGIqDblgzMym5x+vqzPOUDSsmqE5xIKSmCA+JA7122HtAgUhqgSfoF na62MoOXjRB2BgIA0jYc63mAbNbpndW7IlIznYrlrE5/CV6Ug/KJlyub5UGJ58Htj+bi Vsphl8Z7lK5bRQvLLi2Syibq7s4TKHCHHYQ3Ear/vL8je/oLeRXvvdpZ+x2+0WpskP+X JkzA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJaThX7En7pZzEiU+NBAWi6VoaktTOcS3D9K64zKjgWkMAy4zy/w5Wjg l0HGEsT/ze0JMfy1IaoY8cU= X-Google-Smtp-Source: AGs4zMaTZV+OE8MOYqpruerQTvqMqyBOe/b0Yacvo2JWiF8+1/uDYcvOrP3NTLzo/tnqdS7F8Dq4QQ== X-Received: by 10.157.1.175 with SMTP id e44mr242998ote.1.1510564744885; Mon, 13 Nov 2017 01:19:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.202.79.151 with SMTP id d145ls8230842oib.5.gmail; Mon, 13 Nov 2017 01:19:03 -0800 (PST) X-Received: by 10.157.5.211 with SMTP id 77mr102386otd.0.1510564743287; Mon, 13 Nov 2017 01:19:03 -0800 (PST) In-Reply-To: <85643608-a189-4407-8a21-37e5d75074fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert.krewinkel-stqabkCVF6SGlKaCpJGLJw@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:18643 Archived-At: ------=_Part_7303_473399237.1510564742457 Content-Type: multipart/alternative; boundary="----=_Part_7304_1772818367.1510564742498" ------=_Part_7304_1772818367.1510564742498 Content-Type: text/plain; charset="UTF-8" Lua filters are my hammer which makes everything look like a nail, so here is a suggestion on using those to get what you want: function Meta(meta) local f = io.open(meta.metadata_file, 'r') local content = f:read('*a') f:close() return pandoc.read(content).meta end Safe the above to a file and call pandoc with --lua-filter=.lua and --metadata=metadata_file:. It will overwrite all metadata using the contents of the yaml file. See also this issue: https://github.com/jgm/pandoc/issues/3115 On Sunday, November 12, 2017 at 10:34:02 PM UTC+1, scl...-DpHT0TjK6O80n/F98K4Iww@public.gmane.org wrote: > > Hmm ok - I'll look into that :) > > The workflow is probably more edge case from the standard use of pandoc > for academic writing. > > What we want to achieve: > > User -> editor of choice -> save in native format > Apply YAML metadata with user details and extracted customer/client > details from CRM > Apply customised style to ensure consistency > Apply template to ensure consistent cover page, TOC format, > copyright/confidentiality notice, commercial in confidence footer > > Export to PDF for all the good reasons you use PDF for official documents > ;) > > > -- 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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/323e407c-d9ae-429a-b951-1dc5b87a624b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_7304_1772818367.1510564742498 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Lua filters are my hammer which makes everything look like= a nail, so here is a suggestion on using those to get what you want:
functi= on = Meta(meta)
=C2=A0
local f =3D io.open(meta.metadata_file, 'r')
=C2=A0
local content =3D f:read('*a')
=C2=A0 f
:close()
=C2=A0
return pandoc.read(= content).meta
end


Safe the above to a file and call pandoc with --lua-filter=3D<= that-file>.lua and --metadata=3Dmetadata_file:<your-yaml-file>. It= will overwrite all metadata using the contents of the yaml file.

Se= e also this issue: https://github.com/jgm/pandoc/issues/3115

On Sund= ay, November 12, 2017 at 10:34:02 PM UTC+1, scl...-DpHT0TjK6O80n/F98K4Iww@public.gmane.org wrote:
Hmm ok - I'= ll look into that :)

The workflow is probably more edge = case from the standard use of pandoc for academic writing.

What we want to achieve:

User -> edito= r of choice -> save in native format
Apply YAML metadata with = user details and extracted customer/client details from CRM
Apply= customised style to ensure consistency
Apply template to ensure = consistent cover page, TOC format, copyright/confidentiality notice, commer= cial in confidence footer

Export to PDF for all th= e good reasons you use PDF for official documents ;)



--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/323e407c-d9ae-429a-b951-1dc5b87a624b%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_7304_1772818367.1510564742498-- ------=_Part_7303_473399237.1510564742457--