Diagram

Answered

500 error in diagram convert text configuration.

 

diagram: { convert:{ text: false }},

 Whenever I try to add convert text key in diagram type. The server returns 500 error in the api call. The conversion state is DIGITAL_EDIT. I want to prevent text recognition in diagram. I am trying api call with following configurations 

  

const data = {
  xDPI: 0,
  yDPI: 0,
  width: 1920,
  height: 1080,
  contentType: 'Diagram',
  conversionState: 'DIGITAL_EDIT',
  configuration: { lang: 'en_US', text: {}, diagram: { convert:{ text: false }}, export: { jiix: { strokes: false, text: { chars: false, words: true } } } },
  theme: 'ink {color: @@; -myscript-pen-width: 1; -myscript-pen-fill-style: none;-myscript-pen-fill-color: transparent;} .math {font-family: STIXGeneral;} .math-solved {font-family: STIXGeneral; color: #000000;} .text { font-family: Open Sans; font-size: 10;}',
  strokeGroups: [{ penStyle: 'color: #00ff00', strokes: [] }],
};

 

 


Best Answer

Dear Daoud,


just a quick update.


After investigatinf further you can proceed setting the 3 following configurations: "convert":{"text":false, "edge":true, "node":true}


This way, it will work properly.


Best regards,


Olivier


Dear Daoud,


thank you for contacting us.


This is currently an issue, setting the diagram.convert.text configuration to false is not working properly, the text detected in a Diagram is still converted.


The solution at present is that you export as JIIX, so that you have the primitives of the shape, and the stroke information. This way, you can create a svg file, can re-draw the shapes using the primitives and the text strokes using the strokes coordinates that are in the JIIX.


Best regards,


Olivier

Answer

Dear Daoud,


just a quick update.


After investigatinf further you can proceed setting the 3 following configurations: "convert":{"text":false, "edge":true, "node":true}


This way, it will work properly.


Best regards,


Olivier

Thanks for your fast response, it worked if we add node and edge properties in the object. 
I want to know that is there any configuration settings that if we select text type but user draw the diagram and we want to skip the recognition. Because according to the current behavior what we draw in the text type like diagram shapes, api response send us the recognized letters. 

Dear Daoud,


Thank you for the update, I am glad the above answer was of help.


I am not sure to understand your latest request:

if we select text type

>>Do you mean that you are NOT using the Diagram but the Text, and would like that the shapes are not recognized? In that case, it is indeed not possible, if using the Text recogniton, by default our solution considers any stroke is text, and will recognize it accordingly.


Best regards,


Olivier