|
Foxit PDF SDK
|
Class for inserting vector graphics(SVG, WMF/EMF) into PDF files. More...
Static Public Member Functions | |
| static void | Initialize (const wchar_t *library_path) |
| Initialize the vector graphics module by loading the fxvectorgraphics shared library. More... | |
| static void | InsertSVGToPage (const wchar_t *pdf_path, const wchar_t *svg_path, const wchar_t *out_pdf_path, int page_index, float x, float y, float width, float height, int dpi) |
| Insert an SVG file into a rectangular area on an existing PDF page. More... | |
| static void | InsertSVGToPage (const char *pdf_path, const char *svg_path, const char *out_pdf_path, int page_index, float x, float y, float width, float height, int dpi) |
| Insert an SVG file into a rectangular area on an existing PDF page. More... | |
| static void | InsertSVGToPDF (const wchar_t *pdf_path, const wchar_t *svg_path, const wchar_t *out_pdf_path, int page_index, float page_width_pt, float page_height_pt, int dpi) |
| Insert an SVG file as a new page into PDF document. More... | |
| static void | InsertSVGToPDF (const char *pdf_path, const char *svg_path, const char *out_pdf_path, int page_index, float page_width_pt, float page_height_pt, int dpi) |
| Insert an SVG file as a new page into PDF document. More... | |
| static void | InsertWMFToPage (const wchar_t *pdf_path, const wchar_t *wmf_path, const wchar_t *out_pdf_path, int page_index, float x, float y, float width, float height, int dpi) |
| Insert a WMF/EMF file into a rectangular area on an existing PDF page. More... | |
| static void | InsertWMFToPage (const char *pdf_path, const char *wmf_path, const char *out_pdf_path, int page_index, float x, float y, float width, float height, int dpi) |
| Insert a WMF/EMF file into a rectangular area on an existing PDF page. More... | |
| static void | InsertWMFToPDF (const wchar_t *pdf_path, const wchar_t *wmf_path, const wchar_t *out_pdf_path, int page_index, float page_width_pt, float page_height_pt, int dpi) |
| Insert a WMF/EMF file as a new page into PDF document. More... | |
| static void | InsertWMFToPDF (const char *pdf_path, const char *wmf_path, const char *out_pdf_path, int page_index, float page_width_pt, float page_height_pt, int dpi) |
| Insert a WMF/EMF file as a new page into PDF document. More... | |
| static void | Release () |
| Release all resources allocated by the vector graphics module. More... | |
Additional Inherited Members | |
Public Member Functions inherited from foxit::Base | |
| FS_HANDLE | Handle () const |
| Get the handle of current object. 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 VectorGraphics::Initialize to load the fxvectorgraphics shared library. Call VectorGraphics::Release when the module is no longer needed.
Currently, this feature is not supported on the Linux x86/ARM and Mac ARM platform.
|
static |
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 VectorGraphics::Release is called.
| [in] | library_path | Full path to the fxsvgwmf2pdf shared library file. This should not be an empty string. |
|
static |
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). page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
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). page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
Insert an SVG file as a new page into 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 of the page to insert the SVG into. If this value is less than 0, the page is inserted at the beginning of the document. If it is greater than or equal to page_count, the page is appended to the end of the document. page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
Insert an SVG file as a new page into 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 of the page to insert the SVG into. If this value is less than 0, the page is inserted at the beginning of the document. If it is greater than or equal to page_count, the page is appended to the end of the document. page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
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). page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
Insert a WMF/EMF file into a rectangular area on an existing PDF page.
This is an overloaded version that accepts UTF-8 encoded narrow-character paths.
| [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). page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
Insert a WMF/EMF file as a new page into 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 of the page to insert the SVG into. If this value is less than 0, the page is inserted at the beginning of the document. If it is greater than or equal to page_count, the page is appended to the end of the document. page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
Insert a WMF/EMF file as a new page into 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 of the page to insert the SVG into. If this value is less than 0, the page is inserted at the beginning of the document. If it is greater than or equal to page_count, the page is appended to the end of the document. page_count is returned by function pdf::PDFDoc::GetPageCount. |
| [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. |
|
static |
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.