Skip to content

Jasperreports are updated to 7.x#1434

Open
solomax wants to merge 5 commits intomasterfrom
solomax/jreports-7
Open

Jasperreports are updated to 7.x#1434
solomax wants to merge 5 commits intomasterfrom
solomax/jreports-7

Conversation

@solomax
Copy link
Contributor

@solomax solomax commented Mar 24, 2026

Everything is compilable and "sort of" working

The only issue as far as I can tell: SimplePdfPage example look incomplete:

I can see "Before"
I can see contents of PDF
but there is no "After" and link :(((

Any help is highly appreciated! :)

solomax added 2 commits March 24, 2026 21:54
Signed-off-by: Maxim Solodovnik <solomax@apache.org>
Signed-off-by: Maxim Solodovnik <solomax@apache.org>
@reiern70
Copy link
Contributor

@solomax Maybe implement EmbeddedJRReport as InlineFrame?

image

Other idea... use a lazy loading panel... So, that PDF is only asked after the page was rendered,.

tag.put("data", getResponse().encodeURL(urlForListener(null)));
protected void onComponentTag(ComponentTag tag) {
checkComponentTag(tag, "object");
tag.put("data", RequestCycle.get().urlFor(ref, null));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try also putting type

<object data="path/to/your/document.pdf" type="application/pdf" width="100%" height="600px">
    <p>Alternative text - include a <a href="path/to/your/document.pdf">link to the PDF</a> if it cannot be displayed.</p>
</object>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type is here :)) line #84

@solomax
Copy link
Contributor Author

solomax commented Mar 24, 2026

lazy loading panel

this might do the trick. but I wonder: why main page top loading on this sub-request?

@reiern70
Copy link
Contributor

reiern70 commented Mar 24, 2026

Could you please try an iframe? And do something similar to InlineFrame?

@reiern70
Copy link
Contributor

Could you please try an iframe? And do something similar to InlineFrame?

Note: The tag was originally designed for various content types and plugins (like Java applets and Flash), many of which are no longer supported by modern browsers. Specific tags like , ,

@solomax
Copy link
Contributor Author

solomax commented Mar 24, 2026

Well <iframe> is something being threatened as unsafe
According to what I was googled usual way to display pdf: object/embed I can try with embed

While investigating this one I've tried to check code of Image, Video, MediaElement etc. all of them successfully add link to some resource as an attribute of html element and nothing is broken ....

I'm frustrated :(

@martin-g maybe you can help? :))

@reiern70
Copy link
Contributor

reiern70 commented Mar 24, 2026

Well <iframe> is something being threatened as unsafe According to what I was googled usual way to display pdf: object/embed I can try with embed

While investigating this one I've tried to check code of Image, Video, MediaElement etc. all of them successfully add link to some resource as an attribute of html element and nothing is broken ....

I'm frustrated :(

https://www.dofactory.com/html/object#:~:text=The%20element%20embeds%20external,to%20embed%20videos.

according to this iframe is recommended to embed PDF/HTML

Signed-off-by: Maxim Solodovnik <solomax@apache.org>
@solomax
Copy link
Contributor Author

solomax commented Mar 25, 2026

Hello @reiern70,

According to what I can read from the code InlineFrame can't be used due to it supposed to display page inside of it, not resource :(((

In case object is replaced with iframe I'm getting "partial" page

Signed-off-by: Maxim Solodovnik <solomax@apache.org>
@solomax solomax deployed to CI_DEPLOY March 25, 2026 01:41 — with GitHub Actions Active
@reiern70
Copy link
Contributor

Hello @reiern70,

According to what I can read from the code InlineFrame can't be used due to it supposed to display page inside of it, not resource :(((

In case object is replaced with iframe I'm getting "partial" page

I didn't say use it but use it as inspiration...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants