|
Foxit PDF SDK
|
Class for inserting vector graphics (SVG, WMF/EMF) into PDF files. More...
Static Public Member Functions | |
| static | Initialize (library_path) |
| Initialize the vector graphics module by loading the fxvectorgraphics shared library. More... | |
| static | InsertSVGToPage (pdf_path, svg_path, out_pdf_path, page_index, x, y, width, height, dpi) |
| Insert an SVG file into a rectangular area on an existing PDF page. More... | |
| static | InsertSVGToPDF (pdf_path, svg_path, out_pdf_path, page_index, page_width_pt, page_height_pt, dpi) |
| Insert an SVG file as a new page into a PDF document. More... | |
| static | InsertWMFToPage (pdf_path, wmf_path, out_pdf_path, page_index, x, y, width, height, dpi) |
| Insert a WMF/EMF file into a rectangular area on an existing PDF page. More... | |
| static | InsertWMFToPDF (pdf_path, wmf_path, out_pdf_path, page_index, page_width_pt, page_height_pt, dpi) |
| Insert a WMF/EMF file as a new page into a PDF document. More... | |
| static | Release () |
| Release all resources allocated by the vector graphics module. More... | |
Class for inserting vector graphics (SVG, WMF/EMF) into PDF files.
This class provides methods for inserting SVG vector graphics and WMF/EMF metafiles into PDF document. The target PDF is opened, modified, and saved entirely within the fxvectorgraphics shared library, so the caller never needs to open the document with Foxit PDF SDK itself. The output file preserves the structural characteristics of the input PDF (linearization, cross-reference stream, etc.) automatically.
Before calling any other method in this class, call FSDK.VectorGraphics.Initialize to load the fxvectorgraphics shared library. Call FSDK.VectorGraphics.Release when the module is no longer needed.
Currently, this feature is not supported on the Linux x86/ARM and Mac ARM platform.
|
inlinestatic |
Initialize the vector graphics module by loading the fxvectorgraphics shared library.
During the life-cycle of the "vector graphics" module, this function should be called once before any other function in this class. The library remains loaded until FSDK.VectorGraphics.Release is called.
| [in] | library_path | Full path to the fxvectorgraphics shared library file. This should not be an empty string. |
|
inlinestatic |
Insert an SVG file into a rectangular area on an existing PDF page.
The SVG graphic is rendered into the specified rectangle on the given page of the source PDF. The result is written to out_pdf_path. The structural characteristics of the source PDF (linearization, XRef stream, etc.) are preserved automatically.
| [in] | pdf_path | Path of the source PDF file. This should not be an empty string. |
| [in] | svg_path | Path of the SVG file. This should not be an empty string. |
| [in] | out_pdf_path | Path of the output PDF file. This should not be an empty string. |
| [in] | page_index | Zero-based index of the page to insert the SVG into. Valid range: from 0 to (page_count-1). |
| [in] | x | X coordinate of the left edge of the target rectangle, in points. |
| [in] | y | Y coordinate of the bottom edge of the target rectangle, in points. |
| [in] | width | Width of the target rectangle, in points. Must be greater than 0. |
| [in] | height | Height of the target rectangle, in points. Must be greater than 0. |
| [in] | dpi | Rendering resolution in dots per inch. Must be greater than 0. |
|
inlinestatic |
Insert an SVG file as a new page into a PDF document.
A new page of the specified size is inserted at page_index and the SVG graphic is rendered onto it. The result is written to out_pdf_path.
| [in] | pdf_path | Path of the source PDF file. If this is an empty string or the specified file does not exist, a new PDF document will be created using out_pdf_path. |
| [in] | svg_path | Path of the SVG file. This should not be an empty string. |
| [in] | out_pdf_path | Path of the output PDF file. This should not be an empty string. |
| [in] | page_index | Zero-based index at which the new page is inserted. If less than 0, inserted at the beginning; if >= page_count, appended. |
| [in] | page_width_pt | Width of the new page, in points. Must be greater than 0. |
| [in] | page_height_pt | Height of the new page, in points. Must be greater than 0. |
| [in] | dpi | Rendering resolution in dots per inch. Must be greater than 0. |
|
inlinestatic |
Insert a WMF/EMF file into a rectangular area on an existing PDF page.
The WMF/EMF graphic is rendered into the specified rectangle on the given page of the source PDF. The result is written to out_pdf_path. The structural characteristics of the source PDF are preserved automatically.
| [in] | pdf_path | Path of the source PDF file. This should not be an empty string. |
| [in] | wmf_path | Path of the WMF/EMF file. This should not be an empty string. |
| [in] | out_pdf_path | Path of the output PDF file. This should not be an empty string. |
| [in] | page_index | Zero-based index of the page to insert the WMF/EMF into. Valid range: from 0 to (page_count-1). |
| [in] | x | X coordinate of the left edge of the target rectangle, in points. |
| [in] | y | Y coordinate of the bottom edge of the target rectangle, in points. |
| [in] | width | Width of the target rectangle, in points. Must be greater than 0. |
| [in] | height | Height of the target rectangle, in points. Must be greater than 0. |
| [in] | dpi | Rendering resolution in dots per inch. Must be greater than 0. |
|
inlinestatic |
Insert a WMF/EMF file as a new page into a PDF document.
A new page of the specified size is inserted at page_index and the WMF/EMF graphic is rendered onto it. The result is written to out_pdf_path.
| [in] | pdf_path | Path of the source PDF file. If this is an empty string or the specified file does not exist, a new PDF document will be created using out_pdf_path. |
| [in] | wmf_path | Path of the WMF/EMF file. This should not be an empty string. |
| [in] | out_pdf_path | Path of the output PDF file. This should not be an empty string. |
| [in] | page_index | Zero-based index at which the new page is inserted. If less than 0, inserted at the beginning; if >= page_count, appended. |
| [in] | page_width_pt | Width of the new page, in points. Must be greater than 0. |
| [in] | page_height_pt | Height of the new page, in points. Must be greater than 0. |
| [in] | dpi | Rendering resolution in dots per inch. Must be greater than 0. |
|
inlinestatic |
Release all resources allocated by the vector graphics module.
When the user no longer needs the "vector graphics" module, this function should be called to unload the shared library and release all associated resources.