THotPDF.SaveLoadedPageAsSVG Method
Writes the SVG document that BuildLoadedPageSVG builds for a loaded page to a file
Declaration
function SaveLoadedPageAsSVG(PageIndex: Integer;
const FileName: TFileName): boolean; overload;
function SaveLoadedPageAsSVG(PageIndex: Integer;
const FileName: TFileName; EmbedFonts: boolean): boolean; overload;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the loaded page |
FileName | Path of the SVG file to write |
EmbedFonts | True writes the glyphs of embedded fonts as outlines; False, and the overload without this parameter, leaves text to the viewer's installed fonts. See BuildLoadedPageSVG |
Return value
Returns True when the file was written; False when the page index is out of range, the page cannot be exported, or the file cannot be written
Usage notes
- The file is UTF-8 encoded and holds exactly the document
BuildLoadedPageSVGreturns for the sameEmbedFontsvalue; see that method for what the export covers - The document is written to a temporary file first and then moved into place, so a failed export leaves an existing file untouched
- Load a document with
LoadFromFileorLoadFromStreambefore calling this method