How does one call the SVG ord PDF export for a Page from Python
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- tobiasfalk
- Posts: 93
- Joined: Fri Feb 05, 2021 2:35 pm
How does one call the SVG ord PDF export for a Page from Python
How does one call the SVG or PDF export fo a Page from Python
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: How does one call the SVG ord PDF export for a Page from Python
tobiasfalk wrote: ↑Sun May 07, 2023 1:10 pm How does one call the SVG or PDF export fo a Page from Python
Code: Select all
import FreeCAD
import TechDrawGui
p = FreeCAD.ActiveDocument.Page
f = "/home/localuser/myPdfDirectory/savePage.pdf"
TechDrawGui.exportPageAsPdf(p, f)
f = "/home/localuser/mySvgDirectory/savePage.svg"
TechDrawGui.exportPageAsSvg(p, f)