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

PrintPreview is showing images not as it should (black box), as well as the font is different #326

Open
romerfel opened this issue Oct 31, 2022 · 6 comments

Comments

@romerfel
Copy link

I have just upgraded to Delphi Rad Studio 11.2 and installed as well the the HTMLViewer, which I am using since years. But I am facing now an issue with the PrintPreview, where all images are not displayed correctly (see attached printscreens).

The HtmlViewer itself shows the image as it should:
HtmlViewer - OK

But the issue happens in the PrintPreview, where all images are displayed "black"
PrintPreview - NOK

The same issue is as well reproducable with the HtmlDemo app, provided with the component source code.

Would be great if somebody could help me to get this fixed.

@BerndGabriel
Copy link
Owner

In version 11.9 there was a transparency issue with png images. Try the trunk version where it has been fixed.

@romerfel
Copy link
Author

Hi Bernd

Thank you very much for your quick feedback.

Do you with the "master" branch with "trunk version"?
31-10-2022_14-59-51

@BerndGabriel
Copy link
Owner

Sorry, yes.

@romerfel
Copy link
Author

romerfel commented Nov 1, 2022

Hi Gabriel

I have downloaded and installed the "master" branch and recompiled my application. The issue still happens:
01-11-2022_08-31-25

And could it be, that the print preview is now using a different font? It does not look like as the original report (the font is different). You can see this as well in my previous comment, where I have attached a printscreen of the HtmlViewer and PrintPreview view.

@romerfel romerfel changed the title PrintPreview is showing images as it should (black box) PrintPreview is showing images not as it should (black box), as well as the font is different Nov 1, 2022
@BerndGabriel
Copy link
Owner

Can you post or email the used html and image files/text, please?

Using a different font is not intended. Usually the print/preview looks like the "original" in the HtmlViewer.

@romerfel
Copy link
Author

romerfel commented Nov 2, 2022

Hi Gabriel

I got it working as before, by adjusting the following file "htmlcons.inc" and recompiling it. Have "deactivated" the following 2 compliler directives:

  • HasGDIPlus
  • NoGDIPlus

{code}
{$ifdef Compiler22_Plus}
{.$define HasGDIPlus}
{$else}
{$define TSearchRecHasNoTimestamp}
{$endif}

{.$define NoGDIPlus} {The gdiplus.dll provides Alpha transparency support for
PNG images and provides support for TIFF images.
If, for some reason the use of the gdiplus.dll is
undesirable, define "NoGDIPlus" by removing the '.'.}
{code}

02-11-2022_17-32-46

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

No branches or pull requests

2 participants