Link Search Menu Expand Document

PDF to CSV/JSON/XML - Performing explicit page rotation before converting PDF to XML/JSON/CSV

For Zapier, Integromat and others plugins insert custom profiles into profiles field. For API calls please set value as string in profiles parameter as string.

By default OCR is smart to detect page roation and extract text. However there are cases when PDF is drawn unusually. I.e. Instead of marking horizontal pages with the rotation flag, all the text in the document is drawn with rotated text. This kind of rotation can not be detected by OCR automatically. In these kind of sitautions, we can explicitly perform rotation by following profiles values.

{ "OCRDetectPageRotation": false, 'RotationAngle": "Deg90" }

Valid values for the RotationAngle param are Deg90, Deg180, Deg270. Note: 'OCRDetectPageRotation": false is required because this param overrides the RotationAngle if enabled.

Applies To:

  • /pdf/convert/to/csv
  • /pdf/convert/to/xml
  • /pdf/convert/to/json
  • /pdf/convert/to/xls
  • /pdf/convert/to/xlsx

On the other side if we want to have these rotation fixed prior to sending to api, we can also opt some tool or library. For example qpdf command-line utility can rotate files fast and easy:

qpdf.exe --rotate=+90:1-z input.pdf output.pdf