feat: a ready sheet prints at its real size, centred on the film, with the customer's confirmation (Marcus, 2026-12-02)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m55s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m43s

Replaces 7111995 (only 57,0 cm entered; a whole order of 56,5-56,9 cm
sheets was refused, DTF-WEB-2C). Marcus's rules, for Arquivo por metro,
Premium (57 cm) and UV (27 cm):
1. A known width up to the film (PNG recording 200 DPI or more, or a PDF
   page) enters at its real size, centred, billed by its real height.
2. Narrower: his warning before the cart, confirmation required
   (Imprimir no tamanho real / Enviar outro arquivo); recorded in the
   Prumo report ("cliente confirmou folha de 35,8 cm no tamanho real") and
   shown in the cart and payment summaries.
3. Wider than the film: refused with his message.
4. Unknown width: taken as the film's, DPI from the pixels; 200 or more
   with a confirmation, under 200 refused with the artes avulsas hint.
Within 0,1 cm of the film counts as the film. The server checks it all
again at checkout (sheet_width_issue, centred placement, size_confirmed).

Also ops.stretched_sheets: the ready-sheet orders since 16/10 laid out
wider than their real width (number, real width, factor), for Marcus.
Contract: output/revisao/contrato-folha-real.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-12-02 09:51:38 -03:00
parent 7af6c9797d
commit 41126a42fd
22 changed files with 634 additions and 153 deletions

View File

@@ -114,14 +114,14 @@ const ACEITA={
};
const MEDE=/[.](png|jpe?g|webp|gif|bmp|pdf)$/i;
const DPI_RECUSA=96, DPI_AVISA=200; // régua aprovada pela Dropstar · 05/11/2026
// A folha pronta dos produtos têxteis de 57 cm tem de ter 57 cm de largura
// quando a largura real é conhecida: abre um aviso e não entra (Marcus,
// 01/12). Conhecida é um PNG que grava DPI_TAMANHO_REAL ou mais (o limite do
// A1, rodada 5) ou a página de um PDF; o resto segue a regra da versão 0
// (esticada até o filme). output/revisao/contrato-largura-folha.md.
const LARGURA_EXATA={file:57, premium:57};
// Folha pronta no tamanho real, centralizada no filme (Marcus, 02/12):
// output/revisao/contrato-folha-real.md. A largura é conhecida num PNG que
// grava DPI_TAMANHO_REAL ou mais (o limite do A1) e na página de um PDF; senão
// vale a do filme e o DPI sai dos pixels, com DPI_MINIMO_FOLHA de piso.
// Dentro de LARGURA_TOLERANCIA_CM da largura do filme conta como o filme.
const LARGURA_TOLERANCIA_CM=0.1;
const DPI_TAMANHO_REAL=200;
const DPI_MINIMO_FOLHA=200;
// A especificação do PDF limita a página a 14.400 unidades — 200 pol, 508 cm.
// Passar disso só é válido com UserUnit (PDF 1.6+), que a maioria dos programas
// não escreve: o arquivo sai fora do padrão e só o gerador lê direito.