Viewport Render Mode

1
subGm
3/31/2021 1:02 PM

Hello,
I have a question about the DXF export to PDF. The DXF has some layouts, each one with some viewports.
I would like to get a PDF with a render mode of the layouts different from the wireframe. So, in PdfExporterExample.cs I changed the RenderMode property of the viewports objects, setting the property to various render modes.

C# Code:
        public static void ExportToPdf(DxfModel model) {
            string filename = Path.GetFileName(model.Filename);
            string dir = Path.GetDirectoryName(model.Filename);
            string filenameNoExt = Path.GetFileNameWithoutExtension(filename);
            // as PDF
            using (FileStream stream = File.Create(Path.Combine(dir, filenameNoExt + ".pdf"))) {
                PdfExporter pdfExporter = new PdfExporter(stream);
                pdfExporter.EmbedFonts = true;

                GraphicsConfig config = (GraphicsConfig)GraphicsConfig.AcadLikeWithWhiteBackground.Clone();
                config.DisplayLineTypeElementShapes = true;
                config.TryDrawingTextAsText = true;

                foreach (DxfLayout layout in model.OrderedLayouts) {                    
                    foreach (var item in layout.Viewports)
                    {
                        item.RenderMode = RenderMode.GouraudShaded; // this is the code I added
                    }
                    AddLayoutToPdfExporter(pdfExporter, config, model, null, layout);
                }
                pdfExporter.EndDocument();
            }
        }

I don't see any change in the resulting PDF. Is it a limit of trial version or am I doing something wrong?

Wout
3/31/2021 1:08 PM

Hi,

CadLib's pdf exporter is limited to wireframe export only.

- Wout

subGm
3/31/2021 1:15 PM

Hi,
Does this limitation affect only the trial version or the full version as well?

Wout
3/31/2021 1:22 PM

Hi,

In both versions. I would obviously have said so if it wasn't in the full version.

- Wout

subGm
4/2/2021 2:23 PM

Hello,
may be any chance to be added in a future release for the hidden mode in the PDF export?

1