Usage documentation

Created on 4 September 2022, about 2 years ago
Updated 15 October 2023, 12 months ago

Problem/Motivation

This is a great-looking module with plenty of options available in the Views display plugin; I just have some questions about its use as there is currently not much in terms of usage documentation.

HTML Headings and CSS

I have made a view that lists my (content) as rendered entities in a view mode that where each on item is styled up with varying level heading (h1, h2, h3 etc.) tags.

What I'm really looking for is a PDF output that is as true as possible to the styling of the rendered entity - i.e. including headings, colour etc.

I have used the great inline CSS feature to add some (test) colours and --page-breaks-- to the headings but the CSS only seems to apply on headings that have IDs - i.e. 'bookmarks' or 'fragments' such as...

<h3 id="model-answer">

Does this means that I have to somewhere add IDs to every heading in order to have the CSS apply?

Images

Some of my rendered entities contain inline images - very simple things like PNGs but they do not get included in the generated PDF; there is no message of any kind, simply a blank space where the <img> tag would have been rendered.

That doesn't seem quite right to me and in my case renders the solution unusable ;-(

Is that a reasonable comment?

<Iframe> content

In the case of <iframe> I just see...

iframe#iframe-field_iframe-6756 {/*frameborder*/ border-width:0;/*scrolling*/ overflow:hidden;} Your browser does not support iframes, but you can visit

Note that there was no URL after the words "..., but you can visit...

Summing up on those last two points

I suppose where I'm struggling here is that if the PDF-generating code is passed a Rendered entity then why does it care, or even knowthat some of the page content originates from embedded <img> and/or <iframe> tags? In both cases, could it not simply convert what it 'sees' into embedded bitmap images?

I do apologise of that last point was a silly questions, I'm not a heavy code developer; just a humble site-builder by trade.

Thanks

💬 Support request
Status

Closed: works as designed

Version

2.0

Component

Miscellaneous

Created by

🇬🇧United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain jncruces Sevilla

    Hi,

    Sorry for the time waiting my answer.

    I don't know any limitation for the heading classes. Dompdf documentation and issues do not inform that: https://github.com/dompdf/dompdf

    The images always is a problem, you can't provide a general solution i think. Normally you generate a content with pointing to a file and the module try to print that. Any suggestion will be accepted to a better solution.

    Seems that the iframe are not supported by DomPDF: https://github.com/dompdf/dompdf/issues/1228

    HTML can have infinite combinations and i don't know if DomPDF can apply all of them. In the module the html is "converted" minimally to get the PDF.

    The library Dompdf has some limitations and the site builders should take these into account.

    I do apologise of that last point was a silly questions, I'm not a heavy code developer; just a humble site-builder by trade.

    Nothing to worry about. Any question to raise will always be welcome.

  • Status changed to Closed: works as designed 12 months ago
Production build 0.71.5 2024