I’m trying to make cropMark’s in my PDF, I’ve seen the example doc:
http://www.tcpdf.org/examples/example_056.phps
And I’ve downloaded that code and managed to get those cropMarks to work, however I can’t seem to add crop marks to my other PDF code. What are the previous requirements for the PDF in order for the cropMark method to work?
I’m making the cropMark like this (50mm right, 50mm down from 0,0):
$pdf->cropMark(50,50, 10, 10, 'TL', array(255,0,0));
I have tried adding this code before I add the content and after. The content is a combination of Cell, writeHTMLCell and SVG content.
I add the page like this:
$pdf->AddPage('L', $page_format, true, false);
I set the margins of the page
$pdf->SetMargins(0,0,0);
And I don’t set any Header or Footer margins. What am I doing wrong?
UPDATE: I should mention that I don’t get any errors, I just don’t see any cropmarks, my background is blue, and (I believe) the crop marks should be red. Also I’ve tried Adding a new page (AddPage()) and tried drawing crop marks on the new page, but still no luck. Up until now I’ve found the docs to useful and consistent, so I must be doing something wrong.
Unfortunately, I couldn’t find out why the crop marks weren’t working, but I got around it by drawing them my self using the
Linemethod. Here’s the code: