<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    I don't do this much, so I'm not sure this still applies.<br>
    But here are my notes on the subject.  I am on Linux <br>
    now, so windows stuff is generally of no use to me.<br>
    <br>
    <br>
    Convert GeoPDF to GeoTiff:<br>
    <br>
    Do this 1st:<br>
    gdal_translate 'Mount Rose.pdf' 'Mount Rose2.tif' -of GTiff<br>
    <br>
    Do this 2nd:<br>
    gdal_translate 'Mount Rose2.tif' 'Mount Rose.tif' -b 1 -b 2 -b 3
    -mask 4 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR --config
    GDAL_TIFF_INTERNAL_MASK YES<br>
    <br>
    Works on Linux, but creates a HUGE file (~88 MG):<br>
    gdal_translate -of GTiff -co "COMPRESS=DEFLATE" --config
    GDAL_PDF_DPI 300 /home/mike/Documents/copy2/fv.pdf
    /home/mike/Documents/copy2/fv-03.tif<br>
    <br>
    Best one to use on Windows, but does not work on Linux:<br>
    C:\GDAL\bin\gdal\apps\gdal_translate -of GTiff C:\Copy\bm.pdf
    C:\Copy\bm.tif --config GDAL_PDF_DPI 300 -co "COMPRESS=JPEG" -co
    "JPEG_QUALITY=85"<br>
    <br>
    It takes 2 minutes and 15 seconds to process a 10.1MB GeoPDF file.<br>
    <br>
    Oddly on 10/1/2019 I had to copy all the DLL files from C:\GDAL\bin
    into C:\GDAL\bin\gdal\apps<br>
    to get this to work.<br>
    <br>
    Another good one:<br>
    C:\Copy\bin\gdal\apps>gdal_translate -of GTiff C:\Copy\wp.pdf
    C:\Copy\wpt.tif --config GDAL_PDF_DPI 300<br>
    <br>
    <br>
    Don't use this:<br>
    C:\Copy\bin\gdal\apps>gdal_translate -of GTiff -co "TILED=YES"
    -co "TFW=YES" C:\<br>
    Copy\wp.pdf C:\Copy\wpt.tif --config GDAL_PDF_DPI 300<br>
    <br>
    Don't use this:<br>
    C:\Copy\bin\gdal\apps>gdal_translate -of GTiff -co "TILED=YES"
    -co "TFW=YES" C:\Copy\wpt.tif --config GDAL_PDF_LAYERS_OFF
    "Map_Collar","Map_Frame.Projection_and_Grids" --config
    GDAL_PDF_DPI300<br>
    <br>
    <br>
    Mike<br>
    Houston, TX<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 3/25/25 16:03,
      <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev-request@lists.osgeo.org">gdal-dev-request@lists.osgeo.org</a> wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:mailman.12266.1742936605.8076.gdal-dev@lists.osgeo.org">
      <pre>Date: Tue, 25 Mar 2025 13:40:18 -0700
From: Carl Carlson <a class="moz-txt-link-rfc2396E"
      href="mailto:cacarlson@alumni.stanford.edu" moz-do-not-send="true"><cacarlson@alumni.stanford.edu></a>
To: <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
      href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true">gdal-dev@lists.osgeo.org</a>
Subject: [gdal-dev] Reading Layers In USGS Geospatial Topo Files:
Message-ID: <a class="moz-txt-link-rfc2396E"
href="mailto:2AEBA991-A148-4B9D-A2AA-4F8A6FC94F1F@alumni.stanford.edu"
      moz-do-not-send="true"><2AEBA991-A148-4B9D-A2AA-4F8A6FC94F1F@alumni.stanford.edu></a>
Content-Type: text/plain; charset="utf-8"

I have almost no experience with GDAL or python, butI do have  57 years 
programming experience.  I need some help with GDAL.  At 79 I don?t have
 the time and energy to get deeply into these topics.  I need a quick 
solution

I am writing a program to copy selected layers from a 7.5? USGS 
geospatial PDF Topo File and save them as geoTIFFs.  My efforts with 
gdalinfo,  gdal.Open, and gdal.Translate have led me nowhere worthwhile.
  I can?t find the layers.  I just don?t know enough about this.

Would some kind person help me out with sample code?

Thanks</pre>
    </blockquote>
    <br>
  </body>
</html>