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

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 PDF.co 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 PDF.co 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
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.