pdfSetPhysicalLayoutTextMode

Set physical layout mode for text extraction.
void pdfSetPhysicalLayoutTextMode(PDFViewerHandle viewer)
Set the text extraction mode to "physical layout". In physical layout mode, XpdfViewer maintains (as best as possible) the original physical layout of the text.

This is the default setting.

C:
pdfSetPhysicalLayoutTextMode(viewer);
pdfSetTableLayoutTextMode