RDLC shows black background PNG image in PDF

moprsal
Member Posts: 4
Hello,
I have a table with BLOB field. In the BLOB field is store PNG image with transparent background, I use IMPORT function to import an image to the field. I would like to create a report which shows images from the table. Everything goes well, I have a report, I have defined datasource and so on. When I run report from Nav, Preview is showed and it contains images with transparent background. But when I pres "export to PDF", PDF shows black background in images instead of transparent.
In RDLC layout I use object "Image " with Source="Datasource".
Do you have any experiences with export to PDF?
I also tried export image and use it in the report as external source, but the report shows "missing" image (red cross). What doI have to specify regarding this?
I have a table with BLOB field. In the BLOB field is store PNG image with transparent background, I use IMPORT function to import an image to the field. I would like to create a report which shows images from the table. Everything goes well, I have a report, I have defined datasource and so on. When I run report from Nav, Preview is showed and it contains images with transparent background. But when I pres "export to PDF", PDF shows black background in images instead of transparent.
In RDLC layout I use object "Image " with Source="Datasource".
Do you have any experiences with export to PDF?
I also tried export image and use it in the report as external source, but the report shows "missing" image (red cross). What doI have to specify regarding this?
0
Comments
-
On more thing I'm using Nav 2015 (8.00.40938)0
-
If you try a GIF does it work correctly?0
-
Yes, GIF works correctly. Do you have any idea how to print PNG?0
-
It's most likely that RDLC / PDF doesn't handle RGBA particularly well and ignoring the alpha channel. As this channel approaches 1 the opacity increases allowing for semi-transparency.
GIFs on the other hand just have a per-pixel color of "Transparent".
You could convert from PNG to GIF at run-time else use GIF for the reports?
0 -
I was afraid of picture conversion. But there is no other way, as you wrote.
Right now, I dont have any function or SDK to convert PNG to GIF. Do you know how to convert it? Or could you recommend me a SDK/DLL for conversion?0 -
Untested, but you should be able to do it using the `DotNet` variable type:
Name DataType Subtype Length myBitmap DotNet System.Drawing.Bitmap.'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' myImageFormat DotNet System.Drawing.Imaging.ImageFormat.'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' myColour DotNet System.Drawing.Color.'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' // Assuming file from filesystem myBitmap := myBitmap.Bitmap('M:\y\Transparent.png'); myBitmap.MakeTransparent(myColour.Transparent); myBitmap.Save('M:\y\NewTransparent.gif', myImageFormat.Gif);
0 -
I've the same issue. Were you able to resolve?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions