Hello OL-Team,
how should i use GetXYML() to get the Text with X/Y Position? I did not find an example.
Would be nice, if someone can share a running example in javascipt.
kind reagrds
Peter
Hello OL-Team,
how should i use GetXYML() to get the Text with X/Y Position? I did not find an example.
Would be nice, if someone can share a running example in javascipt.
kind reagrds
Peter
Unless I am mistaken, the GetXYML Alambic API function retrieve the whole PDF text, not that of a specific position.
Found out for myself:
but thanks anyway!
var objPDF = Watch.GetPDFEditObject();
objPDF.Open(Watch.GetJobFileName(), false);
var objPages = objPDF.Pages();
var objPage = null;
var content = objPDF.GetXYML()
saveToFileUtf8(content,"c://test.xml");
objPage=null;
objPages=null;
CollectGarbage();
objPDF.Close();
/**
* Save the string "content" in a file named "filename" using the UTF-8 text encoding.
*/
function saveToFileUtf8(content, filename) {
var stream = new ActiveXObject("ADODB.Stream");
try {
stream.Type = 2;
stream.CharSet = "utf-8";
stream.Open();
stream.writeText(content);
stream.saveToFile(filename, 2);
} finally {
stream.Close();
}
}