0

I have a Windows Form Application that I developed with C# which displays AutoCAD (.dwg) files in an eDrawings control. To use this application, users have to have eDrawings control 2014 installed on their computer.

Now, I'm trying to add a Print to PDF button, so the user can click that button and have a black and white PDF saved to their desktop. I have the concept working with the following code...

eDrawingsControl.SetPageSetupOptions(EMVPrintOrientation.eLandscape, 1, 0, 0, 1, 7, "PDF24 PDF", 0, 0, 0, 0);

eDrawingsControl.Print5(true, "", false, true, false, EMVPrintType.eOneToOne, 0, 0, 0, true, 0, 0, @"C:\Users\xxxx\Desktop\" + pn + ".pdf");

Here is documentation for the functions that I used:
SetPageSetupOptions
Print5

but, my problem is that it prints the PDF pixelated, which will not work... These PDFs of the AutoCAD drawings need to be clear and easily readable.

I've tried these free PDF printers:
Microsoft Print to PDF (comes on Windows 10)
PDF24 PDF
CutePDF Writer

Does anyone know a free way that I could print a .dwg file to a .pdf via the eDrawings control in my Windows Form App? Do I just need to alter the parameters I am passing to the functions shown?

Note: I've changed the first parameter of Print5 to false, but changed it back to true for testing..

we_cs_tp
  • 11
  • 3
  • The print method is a raster print. It will only print bitmap and not vertorial. That has nothing to do with the print tool you are using. – Franck Mar 18 '19 at 17:33
  • Oh! Thanks! Didn't realize :) Do you know how I can print vertorial? – we_cs_tp Mar 18 '19 at 18:37
  • In PDF yes. PDF format is openly available on Adobe website and you can actually draw your page with lines and shapes which are vectorial but you have to read your DWG lines, curve, Arc and individually draw them in the page. It's ALOT of work and extremely custom case per case. So you know i did it twice already in the past but i am now using a simpler non free solution. – Franck Mar 19 '19 at 12:55

0 Answers0