Extraction or recognition
A Punjabi PDF saved from a Unicode document holds its text, so converting it is extraction and comes out close to exact. A scanned Punjabi PDF holds pictures of pages, so it is recognised first and inherits recognition’s mistakes, described on the Punjabi OCR page. You upload both the same way.
A word cut at its nasal sign
Gurmukhi stacks two signs that take no width of their own, such as the u-sign and the tippi in ਨੂੰ, and the PDF library underneath this converter used to end a line between them, so the word came apart. Pieces that sit on one another are joined back into one line now; in our Punjabi test PDF, ਨੂੰ was cut four times and is whole every time. PDFs made by Word in the Raavi font have a further fault, a wrong text for each conjunct glyph, and the converter reads those glyphs from the font’s own shaping rules instead. One Word test file still lost two lines at the foot of its first page, which we have not traced.
Asees, the legacy font
Asees is the Government of Punjab’s legacy font: it stores keys rather than Gurmukhi letters, so its text copies as Latin letters and symbols. The table here was read off the font itself, and checked by drawing 180 words of Tesseract’s own Punjabi word list in it and reading them back, 158 of which came back as themselves. No real document typed in Asees has reached us yet, so the reading side is unproven on one. AnmolLipi and other Punjabi faces each use a layout of their own and have no table.
What is kept
Punjabi text, reading order and paragraphs come through, and so do the fonts a digital PDF names, with their sizes, bold, italic and colour; its tables, as Word tables; its pictures; and its running heads, in Word’s header. A PDF whose every page is scanned is rebuilt a page at a time, at the page’s size, with its lines where the scan sets them. Text wrapped round a picture, or a box laid across columns, comes out simpler than the page.