I'm very new at trying to generate PDF's, and I've been given the task of trying to recreate one of our PDF generators with AbcPdf6. The old system used an unknown library, thus making updates difficult/impossible, but it drew the PDF from an SVG file. The old system was able to grab "text" nodes and modify their innerhtml then spit them back out to the PDF.
The problem I'm having right now is that with AbcPdf, the only way I can see to get elements of the document I just read in is with GetText(). But when I use this to read in my SVG document, all the Id's are stripped out, which makes it impossible to find the ones I need to modify. Does any one have any idea why?
Here's an example of the problem:
SVG going in:
<text id="DevelopmentName" transform="matrix(1 0 0 1 25 59.1519)"
font-family="'Verdana-Bold'" width="400" font-size="36">DEVELOPMENT NAME</text>
C#:
Doc pdfDoc = new Doc();
pdfDoc.Read(oContext.Server.MapPath(path));
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(new StringReader(pdfDoc.GetText("SVG")));
At this point I should be able to do xmlDoc.GetElementById("DevelopmentName") and have it return the above node, however it returns null. Upon inspecting what pdfDoc.GetText("SVG") returns I see this for my text node:
<text xml:space=\"preserve\" x=\"25\" y=\"59.1519\" font-size=\"36\"
font-family=\"Verdana-Bold\" textLength=\"429.408\" >DEVELOPMENT NAME</text>
I can't for the life of me figure out why its doing this OR if there is some other way I'm supposed to be loading in this SVG. Can anyone offer insight?