PDF Export transparency

1
McGum
3/15/2021 10:38 AM

Hi,

I have hatches with transparency - but if I export this to pdf -- the transparency is los.
Is this a bug? or by design?

Wout
3/15/2021 10:49 AM

Pdf transparency has been implemented only recently since Feb 12, version 4.0.38.253. Here's some test code to verify:

C# Code:
            var model = new DxfModel();
            model.Entities.Add(new DxfCircle(EntityColors.Red, Point2D.Zero, 1d));
            var hatch = new DxfHatch {
                Color = EntityColors.Blue,
                Transparency = Transparency.Create(128)
            };
            var boundaryPath = new DxfHatch.BoundaryPath(BoundaryPathType.Polyline);
            boundaryPath.PolylineData = 
                new DxfHatch.BoundaryPath.Polyline(
                    true,
                    new Point2D(-1, -1), new Point2D(1, -1), new Point2D(0, 1)
                );
            hatch.BoundaryPaths.Add(boundaryPath);
            model.Entities.Add(hatch);
            DwgWriter.Write(@"C:\support\woutware\transparenthatch.dwg", model);

            PdfExporterExample.ExportToPdf(@"C:\support\woutware\transparenthatch.dwg");

- Wout

McGum
3/15/2021 10:59 AM

Thanks, will try!

McGum
3/15/2021 11:42 AM

EDIT: It works with Lines. I think, the Issue with the hatches I have to investigate if the black hatches are wrong. So please ignore for now

1