1. Richard Smit
  2. PowerBuilder
  3. Monday, 22 May 2023 19:20 PM UTC

Hi, I have a datawindow (A4 papersize for printing and no margins) and use a .jpg file for the background picture (Brush mode 6 Picture). The jpg is a 300dpi 2480x3507 (A4). When I use Tile mode 0 (Original size) then the picture is not shown at all. Not in the IDE 2022 and not at runtime. When I use another tile mode the picture is a bit stretched and there are margins around it. Can anyone help me with this?

Who is viewing this page
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 June 2023 00:30 AM UTC
  2. PowerBuilder
  3. # 1

Hi Richard;

  I reworked your test case using a picture control in the background layer of the DWO object instead.

The PDF seems to look OK as well on my system. Please try the attached test case that I made and let us know.

HTH

Regards .. Chris

Attachments (1)
Comment
There are no comments made yet.
Richard Smit Accepted Answer Pending Moderation
  1. Wednesday, 31 May 2023 20:58 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris, Miguel,

Thanks for your effort! I played with the scale, no result. I  also played with size 30% but that gives strange results. Extra margins and creating a PDF results in very small picture. I will report a bug.

Thanks again!

Regards,

Richard

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 1 June 2023 00:26 AM UTC
Thanks Richard, that would be a good idea IMHO.

Suggestion: Try adding a Picture Control to the background layer of the DWO and use that to control the image instead.

I'll post an example I just made from your test case.

HTH

  1. Helpful 1
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 22:08 PM UTC
  2. PowerBuilder
  3. # 3

I've been playing around with your sample app. If you reduce the image size to 30% of its original size (using Paint), mode 0 works!

Apart from not having ANY documentation on the values for Tile Mode, since when this was introduced in PB 11.x in 2008, I think this should be reported as a bug.

kind regards,

Miguel Leeuwe

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 20:56 PM UTC
  2. PowerBuilder
  3. # 4

Hi,

Your example jpg file has a resolution waaaaay bigger than what would fit on an A4 sheet. That might explain why mode 0 doesn't show anything.

I was wrong with previous statement: https://www.a4-size.com/a4-size-in-pixels/?size=a4&unit=px&ppi=300

regards

Comment
There are no comments made yet.
Richard Smit Accepted Answer Pending Moderation
  1. Tuesday, 30 May 2023 20:20 PM UTC
  2. PowerBuilder
  3. # 5

Hi Chris,

 

Thanks for your response!

Attached a simple application with a window and datawindow control. The datawindow control has a picture as a background. Tile mode 0 original size does not work (shows nothing). I do not understand why. Tile mode 4 Stretch to fit seems to work but I am not sure about it regarding margins and result of the shape compared tot the original JPG. 

Why does tile mode 0 not work?

You can run the application.

thx

 

Richard

Attachments (1)
Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 31 May 2023 18:53 PM UTC
Hi Richard;

Thank you for the test case! I now see what the problem from your perspective. The use of the DWO's "background mode" though was more for creating a "banding" effect in the DWO's background rather than a full size image as wallpaper. However, I think that Miguel is correct about resizing the image to properly fit in the DWO area. I would suggest setting the DWO's units to either Inches or CM's and then use an imaging program to resize the image to that exact size as well. Then in the DWO, set the background image mode to "original size". Having the image in "stretch" mode currently *will* distort it depending on the size of the DW Control area or worse, when the PDF is created using the default printer settings.

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 24 May 2023 18:54 PM UTC
  2. PowerBuilder
  3. # 6

Hi Richard;

  FYI: Tiling also depends on the Scale.X and Scale.Y values.

Can you give us more details & better yet, a small test case PB App that replicates your exact problem?

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.