setting the resolution (dpi) before importing geopdf files

Hi,

is it possible to set the resolution (dpi value) for geopdf import like doing the import with the gui? 

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    The easiest way to set up an IMPORT command is to load a file into Global Mapper using the GUI, then save a workspace. A workspace is a script file, so you can open it in a text editor and look at the IMPORT command that gets generated. 

    The DPI used to import a PDF is in the LOAD_FLAGS parameter. This parameter takes a comma-separated list of values, and DPI is the second one. The first value is the frame index in the PDF, and you can use -1 to get all of them. Using
    LOAD_FLAGS="-1,200"
    will read an image from the PDF with a DPI of 200.

    Cheers,
    Bob
  • Hello,

    the import doesn't work as I expect.

    If I load the PDF with a DPI of 75
    IMPORT FILENAME="V:\sample.pdf" FORMAT="PDF" LOAD_FLAGS="-1,75" SAMPLING_METHOD=BICUBIC PROJ="redLS150"

    and I check the metadata for this layer the Render_DPI value has a value of 250. This was the setting of the last gui run.

    Any idea what is going wrong with? I'm still using Global Mapper V21.0.

    Cheers,
    Daniel


  • Hello,

    I think it is not allowed to shorten the LOAD_FLAGS parameter. If I try
    LOAD_FLAGS="-1,150,,1,2"
    to render my PDF with 150 dpi my import script works well.

    Cheers,
    Daniel