summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/tlgs/pdf2dsc.lua
blob: b69163939cd48612446e9d70028eca2870ed6697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env texlua
--*-Lua-*-
-- $Id$

-- Copyright (C) 2007-2022 Reinhard Kotucha.
-- You may freely use, modify and/or distribute this file.

doc = {
  invocation = '[options] <inputfile> [<outputfile>]',
  synopsis = 'Extract DSCs from PDF files',
  details = [=[
    <inputfile> is a PDF file.  <outputfile> is a DSC file.
]=]}

default_outfile_ext = '.dsc'

dofile(arg[0]:match('(.*[/\\]).*$')..'tlgs-common')

local command = {gsname()}

addto(command,
     '-dDELAYSAFER',
     '-dNODISPLAY', 
     '-sPDFname='..file.input,
     '-sDSCname='..file.output,
     'pdf2dsc.ps')

execute(command)

-- Local Variables:
--  mode: Lua
--  lua-indent-level: 2
--  indent-tabs-mode: nil
--  coding: utf-8-unix
-- End:
-- vim:set tabstop=2 expandtab: