Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL reads PDF as blank #45657

Closed
2 tasks done
PhiliusMaximus opened this issue Oct 25, 2021 · 9 comments
Closed
2 tasks done

GDAL reads PDF as blank #45657

PhiliusMaximus opened this issue Oct 25, 2021 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers Windows Related to Windows operating system

Comments

@PhiliusMaximus
Copy link

What is the bug or the crash?

Georeferencer opens all .pdf files but some are not visible; they appear white with no image detail.

This does not occur on all .pdf files and I have attached one example where it does not work for me below.

  • I have tried different QGIS profiles and created a new one (this does not fix the bug)
  • I have tried printing the document to pdf and opening the print (that does not fix the bug)
  • The .pdf file is not layered, has no markups, special features, that I can see (using Foxit)
  • This was going wrong for me on 3.16.7 so I updated to 3.16.11 (this did not fix the bug)
  • I have uninstalled all my third party plugins and tried (this does not fix the bug)
  • Same file opens successfully in 3.10.4 (randomly chose an older version where I knew it worked)

Pdf open with no viual in 3.16.11:
2021-10-25 pdf open but no visual

Same pdf open in 3.10.4:
2021-10-25 pdf open with visual

Up until now I have been able to take screenshots of the pdf files that have this error and geocode those instead, but I will be trying to geocode some large plans soon and I don't think screenshots will suffice.

Steps to reproduce the issue

Boyton Place Mng Co areas.pdf

I have attached the pdf that I opened in the screenshot examples.

  1. on the menu bar click the Raster option
  2. click Georeferencer...
  3. open the file attached

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.16.11-Hannover QGIS code revision 26cc1c7
Compiled against Qt 5.15.2 Running against Qt 5.15.2
Compiled against GDAL/OGR 3.3.1 Running against GDAL/OGR 3.3.1
Compiled against GEOS 3.9.1-CAPI-1.14.2 Running against GEOS 3.9.1-CAPI-1.14.2
Compiled against SQLite 3.35.2 Running against SQLite 3.35.2
PostgreSQL Client Version 13.0 SpatiaLite Version 5.0.1
QWT Version 6.1.3 QScintilla2 Version 2.11.5
Compiled against PROJ 8.1.1 Running against PROJ Rel. 8.1.1, September 1st, 2021
OS Version Windows 10 Version 2009
Active python plugins qfieldsync; qgis2web; db_manager; processing

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

While 3.10.4 is over a year old, I think this error has only been occuring for a month or two. Apologies, I don't keep logs of software installs!

@PhiliusMaximus PhiliusMaximus added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 25, 2021
@gioman gioman added Feedback Waiting on the submitter for answers Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) labels Oct 25, 2021
@gioman gioman changed the title PDF blank (all white) in Georeferencer in QGIS 3.16.11 and 3.16.7 (works in earlier version 3.10.4) PDF blank (all white) in Georeferencer Oct 25, 2021
@gioman
Copy link
Contributor

gioman commented Oct 25, 2021

@PhiliusMaximus this seems to be a GDAL/upstream problem.

On Windows/QGIS 3.16 and 3.20 based on the osgeo4w installer v2, with GDAL 3.3.1 if I gdal_translate the PDF to a tif the resulting layer is also blank.

Doing the same on installs based on older GDAL releases (like 3.0.3) it returns a correct result.

This should be also asked/reported in the GDAL tracker.

@PhiliusMaximus
Copy link
Author

@PhiliusMaximus this seems to be a GDAL/upstream problem.
This should be also asked/reported in the GDAL tracker.

Thanks @gioman - have done this (I hope! I'm very new to GitHub) - OSGeo/gdal#4701

@PhiliusMaximus
Copy link
Author

Cross-reported on GDAL - they say it's not them. OSGeo/gdal#4701
What's next?

@gioman
Copy link
Contributor

gioman commented Oct 25, 2021

@PhiliusMaximus the pattern seems to be related to the gdal version shipped with QGIS. If they say is not a bug then maybe is a missing library/driver, but seems strange to me because the format is recognized, it just turn out that gdal do not seems to be able to read any info from the input. More investigation is needed.

@gioman gioman added Windows Related to Windows operating system and removed Georeferencer labels Oct 25, 2021
@gioman
Copy link
Contributor

gioman commented Oct 25, 2021

And by the way, is not a georeferencer only issue (try gdal_translate from the Processing toolbox) and GDAL 3.0.4 (Ubuntu 20.04) reads/concerts that PDF without issues. So also this seems to be a Windows/Osgeo4w v2 issue only.

@gioman gioman changed the title PDF blank (all white) in Georeferencer GDAL reads PDF as blank Oct 25, 2021
@PhiliusMaximus
Copy link
Author

I'm grateful for your input, @gioman, thank you.

@gioman
Copy link
Contributor

gioman commented Oct 26, 2021

I'm grateful for your input, @gioman, thank you.

@PhiliusMaximus I updated to 3.3.2 on Ubuntu 20.04, and it reads the PDF as expected. So this seems likely a packaging problem but still not an issue in QGIS code per se. This should be filed here instead: https://trac.osgeo.org/osgeo4w/report/1?sort=ticket&asc=0&page=1

@gioman gioman added Build/Install Related to compiling or installing QGIS and removed Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) labels Oct 27, 2021
@PhiliusMaximus
Copy link
Author

Posted to https://trac.osgeo.org/osgeo4w/ticket/702#no1 for further investigations.
Again, thank you to @gioman for the help!

@jef-n
Copy link
Member

jef-n commented Nov 16, 2021

Duplicate of #44522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers Windows Related to Windows operating system
Projects
None yet
Development

No branches or pull requests

3 participants