3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
259 stars 143 forks source link

[feature] - add document preview with zoom controls for pdf docs in data/display info #1321

Closed josemvm closed 1 year ago

josemvm commented 5 years ago

imagem

josemvm commented 1 year ago

just remember LizmapTeam ;-)

Gustry commented 1 year ago

I think you can already do it with the "QGIS HTML maptip" popup if you generate the correct HTML : https://www.w3docs.com/snippets/html/how-to-embed-pdf-in-html.html

But I haven't tried, it's just an idea. Some users are already integrating PDF viewer in Lizmap with custom Javascript and API.

josemvm commented 1 year ago

hi @Gustry after several experiments, i can conclude that this can be done very easily:

popup source: QGIS HTML maptip: <iframe src="[%"pdf_field_name"%]" width="100%" height="500px"></iframe>

popup source: Lizmap HTML: <iframe src="{$pdf_field_name_OR_alias_pdf_field_name_if_exists}" width="100%" height="500px"></iframe>