Created
October 10, 2023 12:47
-
-
Save bjoerntx/d7dd443503c18d3f0517bcd915ce1cac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string[] CreateSVG(ServerTextControl TextControl, | |
bool GlyphOutlines = false, | |
int FromPage = 1, | |
int ToPage = -1) | |
{ | |
// create array for SVGs | |
string[] svgPages = new string[(ToPage == -1 ? TextControl.Pages : ToPage)]; | |
// set page content | |
TXTextControl.Page.PageContent pageContent = | |
GlyphOutlines ? TXTextControl.Page.PageContent.All | TXTextControl.Page.PageContent.GlyphOutlines | |
: TXTextControl.Page.PageContent.All; | |
for (int i = FromPage; i <= (ToPage == -1 ? TextControl.Pages : ToPage); i++) | |
{ | |
// get SVG from page | |
svgPages[i - 1] = TextControl.GetPages()[i].GetImage(pageContent, 96); | |
} | |
return svgPages; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment