[gdal-dev] Can a GepPDF be generated using a Composition file from command line?
Andrew C Aitchison
andrew at aitchison.me.uk
Wed Aug 26 05:50:41 PDT 2020
On Wed, 26 Aug 2020, Ian Mayo wrote:
> The documentation page for PDF via GDAL includes the description for
> using an XML Composition File:
> https://gdal.org/drivers/raster/pdf.html#creation-of-pdf-file-from-a-xml-composition-file-gdal-3-0
>
> But, the description only gives examples of the XML Composition file
> being used from C++ or Python code.
>
> Is it possible to use the XML Composition file directly from GDAL
> commands on the command line?
That page links to
https://raw.githubusercontent.com/OSGeo/gdal/master/gdal/swig/python/samples/gdal_create_pdf.py
which is a python script to do exactly that.
> (presumably the Composition file would be passed as a -co creation
> option parameter)
def Usage():
print('Usage: gdal_create_pdf composition.xml out.pdf')
return -1
... so you don't even need the "-co" argument.
--
Andrew C. Aitchison Kendal, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list