PdfConverterAgentTools Class
Provides AI agent tools for PDF document conversion operations.
Inherited Members
Namespace: Syncfusion.AI.AgentTools.PDF
Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
Syntax
public class PdfConverterAgentTools : AgentToolBase<PdfDocumentBase>
Constructors
PdfConverterAgentTools(DocumentStorageManager)
Initializes a new instance of the PdfConverterAgentTools class (Mode 2 � DocumentStorage).
Declaration
public PdfConverterAgentTools(DocumentStorageManager manager)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentStorageManager | manager | The document storage manager. |
PdfConverterAgentTools(PdfDocumentManager)
Initializes a new instance of the PdfConverterAgentTools class (Mode 1 � InMemory).
Declaration
public PdfConverterAgentTools(PdfDocumentManager manager)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfDocumentManager | manager | The PDF document manager. |
Methods
ConvertImageToPdf(String[], PdfImagePosition, Int32, Int32, String)
Creates a PDF document from one or more image files using ImageToPdfConverter with control over image placement and page size.
Declaration
[Tool(Name = "ConvertImageToPdf", Description = "Creates a PDF document from one or more image files using ImageToPdfConverter with control over image placement and page size. imageFiles: Array of image file paths (InMemory mode) or storage keys (DocumentStorage mode). outputFilePath: Output file path for saving the result (DocumentStorage mode only).")]
public AgentToolResult ConvertImageToPdf([ToolParameter(Description = "Array of image file paths (InMemory mode) or storage keys (DocumentStorage mode)")] string[] imageFiles, [ToolParameter(Description = "Image placement style on the PDF page")] PdfImagePosition imagePosition, [ToolParameter(Description = "The width of the PDF page in pixels")] int pageWidth = 612, [ToolParameter(Description = "The height of the PDF page in pixels")] int pageHeight = 792, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | imageFiles | Array of image file paths (InMemory mode) or storage keys (DocumentStorage mode). |
| PdfImagePosition | imagePosition | Image placement style on the PDF page. |
| System.Int32 | pageWidth | The width of the PDF page in pixels. |
| System.Int32 | pageHeight | The height of the PDF page in pixels. |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result containing the document ID of the created PDF. |
ConvertPdfToPdfA(String, PdfConformanceLevel, String)
Converts an existing PDF document into a PDF/A-compliant document based on the specified conformance level.
Declaration
[Tool(Name = "ConvertPdfToPdfA", Description = "Converts an existing PDF document to a PDF/A compliant format. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode). conformanceLevel defines the supported PDF/A standard to apply ( PdfA1B, PdfA2B, PdfA3B, Pdf_A4, Pdf_A4F, Pdf_A4E).")]
public AgentToolResult ConvertPdfToPdfA([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Target PDF/A conformance level")] PdfConformanceLevel conformanceLevel, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentIdOrFilePath | The document ID (InMemory mode) or input file path (DocumentStorage mode). |
| PdfConformanceLevel | conformanceLevel | Target PDF/A conformance level (PdfA1B, PdfA2B, PdfA3B, Pdf_A4, Pdf_A4F, Pdf_A4E). |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result containing the document ID and the applied conformance level. |