I have some code and some sample DWG files that were downloaded from AutoDesk website. The code I am using looks at the PlotPaperSize.Width and PlotPaperSize.Height specified in the default layout (“Model”) and sets the PDF PageWidth and PageHeight using these values to convert from millimeters to inches.
AutoCad1.dwg produces a PDF with page size 199.? x 129.? inches. This should be 17 x 11 inches. This was unexpected.
AutoCad2.dwg produces a PDF with page size 11 x 8.5 inches as expected.
I have several other DWG examples that produce the correct page size using this code if you need them, but this one file (AutoCad1.dwg) seems to produce a PDF with a huge page size.
I have included a .Net solution file using Aspose.CAD 17.12 and Aspose.PDF 18.1. If you run the example it will produce in bin/Debug the two PDF files pdf1.pdf and pdf2.pdf that correspond to the DWG example files that I have supplied.
I have worked with file shared by you using Aspose.CAD for .NET 17.12 and have been able to observe the issue. A ticket with ID CADNET-537 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.
I found another CAD file that demonstrates page sizing issues. Here is a link to the sample project and examples…
AutoCad1.dwg in this examples converts to bin/Debug/pdf1.pdf which is .43 x .33 inches instead of 11 x 8.5 as expected.
I think this is likely related to CADNET-537, but I wanted to make you aware of it since it is the opposite problem of the previous sample I sent (that one was too large and this one is too small).
I have observed your comments. I have shared sample code in a text file with you. This will help you to get expected result. Please check attachment and share feedback with us if there is still an issue.sample code (2).zip (1.0 KB)
@Adnan.Ahmad Is that code publicly available anywhere? I’m running into the same issue and would like to see it, but thread attachments are private by default.
I have observed your comments. I have shared dropbox link with you. You can download sample code from this link. Please share feedback with us if there is still an issue.
@ugur.acarr1453,
Hi.
I’m afraid we need more information about your goal and the initial file. Please, describe it in more details, so we can help you. Thanks.