Is there a way to specify the bleed in TCPDF?

23 Views Asked by At

I am using TCPDF to generate a PDF that will be printed by a professional printing company.

They have the requirement that the 3 mm of the bleed are contained in the dimensions of the pages in the PDF. A usual A5 page is 148 x 210 mm. But the printing company wants it to have in 154 x 216 mm (3 mm additionally on each edge).

Until now, my TCPDF settings look like this:

$pdf = new \TCPDF(
    orientation: 'P',
    unit: 'mm',
    format: 'A5',
    pdfa: 1 // PDF-A1
);
$pdf->SetMargins(
    left: 9,
    top: 9,
    right: 9
);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(true);
$pdf->setFooterMargin(9);

I can add the bleed manually to the page size and the margins. But I found that I cannot only specify the page format with a string (like A5) or an array that contains width and height, but I can also pass an array that contains keys like MediaBox, CropBox, BleedBox, TrimBox and so on (see here).

I wonder if and how I could use those options to fulfill my requiring without adding the width of the bleed manually, so that I get an A5 with 9 mm inner margin and 3 mm bleed (outer margin) on each edge.

1

There are 1 best solutions below

0
K J On

You should be talking to the printers design shop and if they do not have one why not ?

The design shop should be working to these PDF program variables (in printers points) for compiling the page as described. Clearly it contains, in this example, body data that you will supply. Since the drawn boxes are not the real contents.

It is unclear why you are required to work in a /BleedBox if you have a 9 mm clear margin around the /Art, other than it allows for the trim marks.

enter image description here

%PDF-1.4
1 0 obj <</Type/Catalog/Pages 2 0 R/Metadata null >> endobj
2 0 obj <</Type/Pages/Count 1/Kids[3 0 R]>> endobj
3 0 obj <</Type/Page/Parent 2 0 R/MediaBox[-8.504 -8.504 428.032 603.78]/BleedBox[-8.504 -8.504 428.032 603.78]/TrimBox[0.000 0.000 419.528 595.276]/Contents 4 0 R/Resources<<>>>>endobj
4 0 obj <</Length 659>>stream
%Media & Bleed Box
0.0 1.0 0.0 0.0 K
-8.504 -8.504 436.536 612.284 re s
%Crop Box
1.0 0.0 0.0 0.0 K
0 0 419.528 595.276 re s
%Trim Marks
0.0 0.0 1.0 RG
0.000 -2.835 m 0.000 -8.504 l s  419.528 -2.835 m 419.528 -8.504 l s
-8.504 0.000 m -2.835 0.000 l s  422.363 0.000 m 428.032 0.000 l s
0.000 598.111 m 0.000 603.780 l s  419.528 598.111 m 419.528 603.780 l s
-08.504 595.276 m -02.835 595.276 l s  422.363 595.276 m 428.032 595.276 l s
%ArtBox with 9 mm margin to be replaced by oversized for where bleed is required !
0.6 0.6 0.6 RG
25.512 25.512 368.504 544.252 re s
25.512 25.512 m 394.016 569.764 l s  25.512 569.764 m 394.016 25.512 l s
endstream
endobj
xref
0 5
0000000000 65536 f  0000000010 00000 n  0000000071 00000 n  0000000123 00000 n  0000000310 00000 n
trailer
<</Size 5/Root 1 0 R>>
startxref
1020
%%EOF