Fix pages that break the margin rule: shrink (default) or crop

Always works from the original upload, so calling it again (e.g. with the other mode) replaces the earlier fix. Compliant pages, and US Letter pages of a mixed document whose placement on A4 keeps the margin, are never changed. shrink scales the affected pages down slightly; nothing is lost. crop keeps pages at 100 % and cuts off everything inside the margin band, which is then not printed; pages of other sizes are first fitted onto A4. A US Letter document keeps its US Letter pages. Mode via JSON body or ?mode=.

post/documents/{id}/fix

Request

  • Base URL: https://printandmailcompany.com/api/v1
  • URL: https://printandmailcompany.com/api/v1/documents/{id}/fix
  • Auth: HTTP bearer

Path parameters

idstring required

Query parameters

mode'shrink' | 'crop'

Request body

mode'shrink' | 'crop'

Response

Updated document (fixMode, fixedAt, compliant, analysis per page)

idstring
fileNamestring
pageCountinteger
sizeBytesinteger

Size of the uploaded file

compliantboolean

Every page of the print file has the size of its paper (A4, or US Letter for a US Letter document) and keeps the free margin: the document can be sent

hasColorboolean
fixedboolean

A margin fix (shrink or crop) is applied

fixMode'shrink' | 'crop' | 'null' nullable
fixedAtstring date-time nullable
source'upload' | 'url' | 'compose'
printedOn'A4' | 'US Letter'

The paper size uploaded is the paper printed on: "US Letter" when every page is US Letter (8.5 × 11 in), else "A4" (A4 documents, and documents mixing A4 and US Letter pages). A letter with a US Letter document to a destination outside the US, Canada and US territories is printed on the paper the customer chose (Letter paperSize).

usLetterPagesinteger

Uploaded US Letter pages: every page of a US Letter document (printed on US Letter paper, checked with the same margin), or the US Letter pages of a mixed document, which the print file centres on A4 sheets at 100 % or scales down just enough when their content would otherwise come within the margin (analysis.pages[].usLetter.scale, 1 = 100 %). The original upload is kept.

usLetterNotestring nullable

How the US Letter pages are printed, e.g. "The document is printed on US Letter paper, as uploaded. …" or "The US Letter page is printed on A4 paper, centred at 100%."; null without any

analysisobject

Print check of the print file: marginMm, compliant (decides whether it can be printed), allA4 (literally every page A4: false for a printable US Letter document), paper ("a4" or "us_letter"), usLetterPages, a4Version (a US Letter document's version on A4: compliant, scales per page), and per page (pages[]) widthMm, heightMm, isA4, isUsLetter, orientation, contentBox, violations (side, depthMm), usLetter ({ scale } on US Letter pages placed on A4)

createdAtstring date-time
deleteAfterstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.