[gdal-dev] GeoPDF Writing support using Create()?
Even Rouault
even.rouault at mines-paris.org
Wed Nov 21 11:07:22 PST 2012
> it kind of reminds me of GDAL virtual
> format (.vrt) as I think it uses the MEM driver under the hood.
Not really, but the inner working of the drivers isn't very important from the
user point of view.
>
> So, essentially you are telling me I can create a MEM object and store my
> image band information to the recently created GDALDatasetH object (I use
> the C API) and to set PDF metadata via GDALSetMetadata().
Yes, and with GDALSetGeoTransform() and GDALSetProjectionRef()
> Would that be
> the direction I could go to use CreateCopy() for a valid Geospatial PDF
> file?
Yes
>
> I do have a few questions on PDF creation fields:
>
> 1. If a neatline is not provided, what gets populated in the neatline?
the outline of the raster.
>
> 2. For EXTRA_CONTENT_STREAM and EXTRA_IMAGES, are we limited to one entry?
(I've just realized that the doc was not up-to-date, correction committed,
website should be refreshed in a few hours. The name of the option is
EXTRA_STREAM)
- EXTRA_STREAM : yes limited to one entry, but can be complex PDF language
- EXTRA_IMAGES : as indicated in the doc, you can provide a list of images as
the value
> Is it each time we call GDALSetMetadata() is will append another entry
> request?
No, GDALSetMetadata() replaces the existing metadata with the whole list of
key=value strings provided. But you cannot have several entries with the same
key in the list.
>
> Correct me if I am wrong, but EXTRA_CONTENT_STREAM is associated by
> EXTRA_IMAGES where EXTRA_IMAGES tells the PDF file where on the page to
> display the EXTRA_CONTENT_STREAM data?
No, the options are independant. EXTRA_STREAM is a very advanced one. You must
study the PDF language from the specification or other sources to be able to
use it.
EXTRA_IMAGES is must simpler to use (but more limited).
> My concern is how to add multiple entries of EXTRA_CONTENT_STREAM? I know
> the content stream is described by its information and EXTRA_IMAGES and
> EXTRA_CONTENT_LAYER_NAME.
Already answered by above answers. The best if that you try it. You can also
have a look at
http://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/pdf.py, and in
particular pdf_custom_layout()
More information about the gdal-dev
mailing list