Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

OCR.WriteToPDF

Writes text on the PDF.

Component Version macOS Windows Linux Server iOS SDK
OCR 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "OCR.WriteToPDF"; PosX; PosY; Width; Height )   More

Parameters

Parameter Description Example
PosX X-Coordinate of image. $x
PosY Y-Coordinate of image. $y
Width Width of the image. $w
Height Height of the image. $h

Result

Returns OK or error message.

Description

Writes text on the PDF.
This function is good to overlay an OCRed image with text, so you can copy/search the text.
Please set a default font before calling this function.

Be aware that if the font loaded in pdf page is wider than scanned font, the words can overlap.
Plugin version 7.5 or newer will reduce font size if needed to fit word length to fix this.

Examples

Insert image and write text over it:

MBS("DynaPDF.InsertImage"; OCR::Image; $x; $y; $w; $h)
MBS( "OCR.WriteToPDF"; $x; $y; $w; $h)

See also

Release notes

  • Version 7.5
    • Improved OCR.WriteToPDF to reduce font size if needed to make sure words are not too wide.

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 29th January 2023


OCR.Version - Overlay.Alpha