# Export PDF
from pyaedt.generic.pdf import AnsysReport
import os
report = AnsysReport()
report.aedt_version = "2023R2"
report.template_name = "AnsysTemplate"
report.project_name = "CPW_PyAEDT"
report.design_name = "CPW"
report.create()
report.add_page_break()
report.add_chapter("Chapter 1")
report.add_sub_chapter("Description")
cpw_description = """
Coplanar Waveguide (CPW) is a type of electrical planar transmission line used for conveying microwave-frequency signals. It consists of a single conducting strip separated by narrow gaps from two ground planes on either side, all on the same substrate plane. This structure allows for simple manufacturing and easy integration with other circuit components.
Advantages of CPW include:
- Support for quasi-TEM wave propagation and various modes, suitable for a wide range of applications such as high-frequency circuits and antennas.
- Low radiation loss and high power handling capabilities.
- Ease of adaptation to form components like couplers, filters, and resonators.
CPW's planar nature facilitates the integration of active and passive devices directly onto the same substrate, making it a popular choice in modern RF and microwave circuit design.
"""
print(cpw_description)
report.add_text(cpw_description)
report.add_text("Using HFSS Simulation.", bold=True, italic=True)
report.add_empty_line(2)
report.add_page_break()
report.add_chapter("Chapter 2")
report.add_sub_chapter("Charts")
report.add_image(os.path.join(project_dir, "SParam.jpg"), width=20, caption="S-Parameters")
report.add_table("MyTable", [["x", "y"], ["0", "1"], ["2", "3"], ["10", "20"]])
report.add_section()
report.add_chart([0, 1, 2, 3, 4, 5], [10, 20, 4, 30, 40, 12], "Freq", "Val", "MyTable")
report.add_toc()
report.save_pdf(project_dir, "report_example.pdf")