{"body":"sub panexec(Str() :$content, :$defaults, :@filters) is export {\n    my @cmd = </usr/bin/pandoc -t pdf>;\n    @cmd.append: ['--defaults', $defaults] if $defaults;\n    if @filters { for @filters { @cmd.append: ['--filter', $_]; } }\n    my $cmd = Proc::Async.new(:w, |@cmd);\n    my $document;\n    react {\n        whenever $cmd.stdout(:bin) {\n            $document = $_;\n        }\n        whenever $cmd.ready {\n            say 'Document conversion started; PID: ', $_;\n        }\n        whenever $cmd.print: $content {\n            $cmd.close-stdin;\n        }\n    }\n    return $document;\n}","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/NKkIfapE","modified":1602067017,"id":"NKkIfapE","size":583,"lines":19,"own_paste":false,"theme":"","date":1602067017}