Files are from: https://maps.lib.utexas.edu/maps/topo/vietnam/

My PDF reader can read the image but when importing it into QGIS it gives me a cyan rectangle inside a black one which I suspect is the NEATLINE bounding box.

I tried using gdal_translate to convert them in GeoTIFF

gdal_translate ban_buc-5951-4.pdf test.tif -of GTiff

resulting in no error being thrown but test.tif is of the right dimension but all white


gdalinfo -mdd LAYERS ban_buc-5951-4.pdf

don't show any layer names

I saw a GDAL_USER_PWD, would that mean that those file could be password protected?

  • 1
    I downloaded the map bac_kan-6153-2.pdf and in QGIS 3.16.11 it is displayed perfectly fine! I simply drag and dropped the file from my file browser to QGIS.
    – oekoplaner
    Sep 16, 2021 at 11:15
  • 1
    Works for me too. Converting to GTiff works too on the command line. Qgis 3.20.x - tested with a_luoi-6441-4.pdf (first on the list) and the ban_buc one as in your question...
    – Spacedman
    Sep 16, 2021 at 11:20
  • 1
    Opening in QGIS 3.20.0 on Win10 does not work for me, I just get a black frame, inside it's white. Viewing in a pdf viewer of the same file is fine, however.
    – Babel
    Sep 16, 2021 at 12:33
  • 1
    works in QGIS 3.18 but not working in 3.20 same result as @Babel
    – Mapperz
    Sep 16, 2021 at 16:48
  • Seems to be a bug - you should report
    – Babel
    Sep 16, 2021 at 17:06

1 Answer 1


turns out it's a Windows related bug, after I installed gdal on wsl

sudo apt-get install gdal-bin

converting the pdf into jpg, size went from 9.2MB to 3.8MB with no loss of quality

gdal_translate ban_buc-5951-4.pdf test.jpg -of JPEG

Then the jpg opens in QGIS on windows no problem. The only little annoyance is the image appear Cyan tinted as band 1 appears unset and display a min & max value of 1.79769e+308. After setting the band 1 to red manually, all looks good.

I tried setting the band 1 to red during gdal_translate:

gdal_translate -of JPEG -ot Byte -b 1 -b 2 -b 3 \
   -colorinterp_1 red -colorinterp_2 green -colorinterp_3 blue \
   ban_buc-5951-4.pdf ban_buc-5951-4_wsl.jpg

But no luck, but oh well good enough for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.