[gdal-dev] PDF and EXTRA_STREAM

Even Rouault even.rouault at spatialys.com
Fri Feb 5 00:40:43 PST 2016


Le vendredi 05 février 2016 04:22:55, Brent Fraser a écrit :
> I've been experimenting with generating Geospatial PDFs with GDAL and
> would like to wrtie some extra text and lines to the PDF file. The PDF
> drive has a Create Option of EXTRA_STREAM which looks pretty good.  I
> can add text, lines and rectangles by doing:
> 
>    -co EXTRA_STREAM="BT 0 0 255 rg /FTimesRoman 50 Tf 1 0 0 1 1 1 Tm 100
> 200 Td (Hello World!) Tj ET 80 260 m 80 50 l h S 0.9 0.5 0.0 rg 400 50
> 300 200 re f"
> 
> But I think the length of the stream could get very long.  Any interest
> in adding another Create Option like
> 
> EXTRA_STREAM_FILE=my_stuff.txt
> 
> so I could put all the extra in a separate file?

You could also use the "--optfile filename" option available in all GDAL/OGR 
utilities (bottom of http://gdal.org/gdal_utilities.html ) that appends the 
content of filename to the command line.


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list