I am generating pdf document but document may contains special characters like (’,>,<,*,",) so i am getting error,
is there any way to resolve this ?
Discussion posts and replies are publicly visible
DOCX is a XML document. You need to XML escape these characters.
a!localVariables( local!searchString: cons!GAI_XML_CHARS_TO_ESCAPE, local!replaceString: { "&", "'", "<", ">", """ }, local!indexFirstCharacter: if( a!isNullOrEmpty(ri!charsToEscape), null, cast( typeof(0), wherecontains( tostring(index(ri!charsToEscape, 1, null)), touniformstring(local!searchString) ) ) ), local!replaceFirstChar: if( a!isNullOrEmpty(ri!charsToEscape), null, regexreplaceall( tostring( local!searchString[local!indexFirstCharacter] ), ri!inputString, tostring( local!replaceString[local!indexFirstCharacter] ) ) ), local!nextCharsToEscape: remove(ri!charsToEscape, 1), if( a!isNullOrEmpty(local!nextCharsToEscape), local!replaceFirstChar, rule!GAI_Common_EscapeXMLCharacters( inputString: local!replaceFirstChar, charsToEscape: local!nextCharsToEscape ) ) )
i am using above code to escape char, but in PDF instead of & showing &
OpenXML seems to be a bit different. Check the last comment here:
stackoverflow.com/.../ooxml-sdk-illegal-character-replacements
Sudhir Singh said:i am using above code to escape char
Where and how are you doing this, specifically? If it's done in the wrong spot / in the wrong way, it'll be useless.
Any update? The user never answered my follow-up question, so I couldn't really tell you. Your success is the mission at DoMyPaper. I delved into https://domypaper.com/ to do my paper for me and their services and discovered a world of academic support that goes beyond expectations. From robust plagiarism checks to a team of dedicated writers, they've got it all. If you're wondering how to elevate your academic experience, DoMyPaper has the answer. Explore their services and witness the transformation of your goals into accomplishments.
ZackLakin said:Any update?
The user never answered my follow-up question, so I couldn't really tell you.