不确定库,但你肯定可以使用AutoCAD的I/O,这AutoCAD是作为一种web服务运行的,它可以在您的机器上无需任何应用程序。更多信息请登录
这是一个脚本(.scr),您可以在AutoCAD控制台上使用它来创建PDF文件。在这里工作真的很好。
(setq CurrDwgName (getvar "dwgname"))
(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
(setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
;Command:
FILEDIA
;Enter new value for FILEDIA <1>:
0
;Command:
-PLOT
;Detailed plot configuration? [Yes/No] :
Yes
;Enter a layout name or [?] :
Model
;Enter an output device name or [?] :
DWG To PDF.pc3
;Enter paper size or [?] :
ANSI A (11.00 x 8.50 Inches)
;Enter paper units [Inches/Millimeters] :
Inches
;Enter drawing orientation [Portrait/Landscape] :
Landscape
;Plot upside down? [Yes/No] :
No
;Enter plot area [Display/Extents/Limits/View/Window] :
Extents
;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] :
Fit
;Enter plot offset (x,y) or [Center] <0.00,0.00>:
;Plot with plot styles? [Yes/No] :
Yes
;Enter plot style table name or [?] (enter . for none) <>:
.
;Plot with lineweights? [Yes/No] :
Yes
;Enter shade plot setting [As displayed/legacy Wireframe/legacy Hidden/Visualstyles/Rendered] :
;Enter file name :
!name
;Save changes to page setup? Or set shade plot quality? [Yes/No/Quality] :
No
;Proceed with plot [Yes/No] :
Yes
;Command:
FILEDIA
;;;Enter new value for FILEDIA <1>:
1
如果你的感觉就像“老派”,创建一个.bat文件:
FOR %%f IN (C:\dwg_folder\*.dwg) DO "C:\Program Files\Autodesk\AutoCAD \accoreconsole.exe" /i "%%f" /product ACAD /s "C:\folder\PDFScript.scr" /l en-US
这应该分批处理全部的DWG在特定的文件夹为PDF
如果觉得《cad图纸解析java_Java库以编程方式将AutoCAD .dwg文件转换为PDF或图像?》对你有帮助,请点赞、收藏,并留下你的观点哦!