Exporting DWG to PDF Options

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Exporting DWG to PDF Options

Post by apdc » 28 Jan 2012, 03:27

Hi, I have a question with exporting DWG into PDF.

Using a sample file from AutoDesk's website : http://download.autodesk.com/us/samplef ... olorwh.dwg
Output PDF
Output PDF
colorwh.png (163.66 KiB) Viewed 53091 times
Attached is the resulting PDF from the DWG, as you can see the the first page is Fit to Page correctly, but the second and third isn't scaled properly, and stretched horizontally too much. Is there a way to implement "Fit To Page" for each page? Also is it possible to export PDF in landscape orientation?

Thanks.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Exporting DWG to PDF Options

Post by support » 30 Jan 2012, 17:52

Hello.
Unfortunately there is a problem of export multi-layout drawings - current layout only exported with correct sizes ratio. Thank you for the problem description - we will fix it in the future library versions. The current release version doesn't allow export with specified page size. This functionality in development and will be accessible with the next release.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Re: Exporting DWG to PDF Options

Post by apdc » 31 Jan 2012, 23:41

Thank you for the response.

Is it possible to export each layout(s) in a DWG and output them to a separate files/PDFs? Also, is there an estimated time frame for the next release?

Thanks!

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Exporting DWG to PDF Options

Post by support » 01 Feb 2012, 15:10

Hello.
CADToPDF.Settings.LayoutsExportMode value will define if all layouts will be exported or just current layout. So you can switch current layout and export each layout of drawing to separate PDF. Unfortunately we can't give a date of release for a moment, sorry.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Re: Exporting DWG to PDF Options

Post by apdc » 07 Feb 2012, 21:02

Hello,
I tried using the current layout options and using the example above, it gave me an odd output. It extracted the first page correctly. However, it still exported the other 2 layouts (pages), except they're very small blank pages as see in attached layout.

Attached is the simple code I used to export. I am also using the evaluation version, if some reason this could be side effect or something.

CADImport.Export.CADToPDF pdfExporter = new CADImport.Export.CADToPDF(cad);
pdfExporter.Settings.LayoutsExportMode = CADImport.Export.LayoutsExportOption.Current;
pdfExporter.SaveToFile(this.CurrentDirectory + @"\" + Path.GetFileNameWithoutExtension(dlg.FileName) + ".pdf");

Let me know if you have any ideas, thanks.
Attachments
Output with Export.CurrentLayout
Output with Export.CurrentLayout
colorwh single layout.png (174.42 KiB) Viewed 53040 times

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Exporting DWG to PDF Options

Post by support » 09 Feb 2012, 11:28

Hello.
Thank you for the remark. The export of current layout must not produce another layouts in output PDF. We will fix this issue.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Re: Exporting DWG to PDF Options

Post by apdc » 10 Feb 2012, 20:53

Thank you

apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Re: Exporting DWG to PDF Options

Post by apdc » 15 Feb 2012, 03:39

By any chance, do you have an ETA on when this issue is fixed? And, if there a possible workaround to export each layout one by one? Thanks.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Exporting DWG to PDF Options

Post by support » 15 Feb 2012, 11:04

Hello.
Both problems you described with PDF export fixed already. We plan to provide the solutions with the next release version. The release estimated within a month or too. If you strongly need the library with the mentioned solutions for own release then we can build the beta version for you. In this case please send your request to support@cadsofttools.com.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

apdc
Posts: 12
Joined: 28 Jan 2012, 02:32

Re: Exporting DWG to PDF Options

Post by apdc » 22 Feb 2012, 04:21

Hi,
I'm using the beta version and the two bugs are fixed like you said. I do have a question, when exporting to PDF, is there a way to change the orientation to "Landscape" orientation instead of "Portrait"? The Settings properties in the CADtoPDF also does not seem to work, in regards to paper size:

CADImport.Export.CADToPDF pdfExporter = new CADImport.Export.CADToPDF(cad);
pdfExporter.Settings.LayoutsExportMode = CADImport.Export.LayoutsExportOption.Current;
pdfExporter.Settings.PageWidth = 11.5;
pdfExporter.Settings.PageWidth = 8.0;

Let me know, thanks!

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Exporting DWG to PDF Options

Post by support » 22 Feb 2012, 18:33

Hello.
Paper size and orientation will be defined by Settings.PageWidth and Settings.PageHeight values. The functionality will be available with the next release as we mentioned earlier. Unfortunately current release doesn't include the feature as well as provided beta.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply