-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Attribute table frame, with "allow url to be read as HTML format" has not expected result like hyperlink when output PDF file is maked from “GetPrint” request from QGIS Server #52370
Comments
I had a quick look at the issue, the option that makes the difference here when exporting to PDF is: Always render text as text objects. While this mode preserves text objects as text for post-processing in external vector editing applications, it can result in rendering artifacts or poor quality rendering, depending on the text format settings. Even with raster based paint devices, TextFormatAlwaysText can result in inferior rendering quality to TextFormatAlwaysOutlines. When rendering using TextFormatAlwaysText to a vector based device (e.g. PDF or SVG), care must be taken to ensure that the required fonts are available to users when opening the created files, or default fallback fonts will be used to display the output instead. (Although PDF exports MAY automatically embed some fonts when possible, depending on the user's platform). Now, while in QGIS desktop the user can interactively choose the export options, this is of course not possible in the server context. I am not sure we should enable it by default, given the warnings documented above. In theory we could add a new vendor parameter to customize this option but I would turn this into a feature request. @nyalldawson am I correct about the analysis? |
Although it is not possible to choose this export option dynamically in the server context. Is it possible to set the value of this variable through the environment variables defined in the httpd_qgis.conf file? |
no |
Actually, I checked the code now and the option can be activated by passing the documentation here is wrong: https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#format-options the FORMAT_OPTIONS also applies to PDF and not all available options are listed. |
I will open an documentation issue, this one can be closed |
It is already documented: https://docs.qgis.org/testing/en/docs/server_manual/services/wms.html#wms-getprint-formatoptions |
It has been some time since I have consulted the solution to this error. Now that I see it solved, I can't stop thanking you. I have tried it and it works perfectly. |
What is the bug or the crash?
I want to create a layout with “Attribute table frame”
This “Attribute table frame” has an attribute with URL text values, like it is showed in the following image. And also is checked the “Allow url to be read as html format” check button.
When layout is exported to PDF with this extra options (*Text export -> Always export text as text objects):
The output PDF file is correct, in other words; the url’s behaviour is like a hyperlink (on click, url is opened in internet navigator).
But, if output PDF file is maked from “GetPrint” request from QGIS Server. For example: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=home/Test.qgz&SERVICE=WMS&VERSION=1.3.0&FORMAT=pdf&TEMPLATE=ficha&REQUEST=GetPrint&SRS=EPSG%3A25830&map0:EXTENT=-2.009,-2.261,1.756,2.856
The url’s behaviour in “Attribute table frame” are not like a hyperlink (on click, url is not opened).
However if the layout component used is a “label” with “Allow url to be read as html format” checked, the result is as expected in the output PDF file (on click, url is opened).
What can I do to make it work like a hypelink in “Attribute table frame” case?.
Steps to reproduce the issue
Include files and qgis test project with layout.
TextProject.zip
Versions
Versión de QGIS
3.28.4-Firenze
Revisión del código de QGIS
fd0fb72
Versión Qt
5.15.3
Versión de Python
3.9.5
Versión de GDAL/OGR
3.6.2
Versión de PROJ
9.1.1
Versión del registro de base de datos EPSG
v10.076 (2022-08-31)
Versión de GEOS
3.11.1-CAPI-1.17.1
Versión de SQLite
3.39.4
Versión de PDAL
2.4.3
Versión del cliente de PostgreSQL
unknown
Versión de SpatiaLite
5.0.1
Versión de QWT
6.1.6
Versión de QScintilla2
2.13.1
Versión del SO
Windows 10 Version 1903
Complementos activos de Python
GroupStats
2.2.6
profiletool
4.2.3
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99
sagaprovider
2.12.99
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: