Hi
Is there a way to create a text overlay on a PDF from the Microsoft Vision OCR API response in C#? Second to that, what would be the best approach in changing the font size to match the exact bounding boxes?
Hi
Is there a way to create a text overlay on a PDF from the Microsoft Vision OCR API response in C#? Second to that, what would be the best approach in changing the font size to match the exact bounding boxes?
Could you please share the complete detail of your use case along with sample PDF files along with expected result? We will then provide you more information on it.
I have attached a sample form - Sample Document.pdf (643.4 KB). Here is the sample bounding box JSON response from the Microsoft Vision OCR API:
{
“lines”: [
{
“boundingBox”: [
79,
83,
853,
83,
853,
130,
79,
130
],
“text”: “Employment Application”
}
]
}
The bounding box definition is as follows. It show the bounding box corner position in pixels.
“boundingBox”:[
left,
top,
right,
top,
bottom,
left,
bottom,
]
The expected result should be something like this with a text overlay on the document:Result.jpg (150.6 KB)
We have logged a ticket for your requirement in our issue tracking system as PDFNET-51346. You will be notified via this forum thread once there is an update available on it.
We apologize for your inconvenience.