> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 16, 2006 4:11 PM > > Any clues on how you achieve crop marks and bleeds? > > quoting.. pascal sanchos > ------ > Our customers expect now more and more, so we can produce Hi > quality PDF that are used for professional printing, > including crop marks and bleeds (yes, FOP can do that, either > v 0.20.5), etc... > --------
Hi Andy, Sorry for delayed answer, I was on hollydays... Here follows a snippet that should do the trick. HTH, Pascal <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <!-- assume that page size is A4 plus 15mm margin for crops --> <fo:simple-page-master master-name="content" page-height="327mm" page-width="240mm" margin-top="15mm" margin-bottom="15mm" margin-left="15mm" margin-right="15mm"> <fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="20mm" margin-right="20mm"/> <fo:region-before extent="20mm"/> <fo:region-after extent="20mm"/> <fo:region-start extent="20mm"/> <fo:region-end extent="20mm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="content"> <fo:static-content flow-name="xsl-region-before"> <!-- here is how to put a bleed area --> <fo:block-container position="absolute" left="-22mm" top="-2mm" width="244mm" height="22mm"> <!-- left property is set to 0 minus region-start extent plus overflow value (I choose 2mm) --> <!-- top property is set to 0 minus overflow value --> <!-- width property is set to A4 width plus twice overflow value --> <!-- height property is set to area height plus overflow value --> <fo:block>header content</fo:block> </fo:block-container> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block>footer content</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-start"> <!-- I put all marks (crop and center) in start region, because its absolute position (0,0) is the top left page corner (with precedance default value) --> <!-- top left crop mark --> <fo:block-container position="absolute" left="-12mm" top="-12mm" width="12mm" height="12mm"> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm"> <svg xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm" viewBox="0 0 20 20" preserveAspectRatio="none"> <g style="fill:none;stroke:black;stroke-width:0.25"> <path d="M 0 20 h 11.5 M 20 0 v 11.5"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- top right crop mark --> <fo:block-container position="absolute" left="210mm" top="-12mm" width="12mm" height="12mm"> <!-- left property is set to A4 width --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm"> <svg xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm" viewBox="0 0 20 20" preserveAspectRatio="none"> <g style="fill:none;stroke:black;stroke-width:0.25"> <path d="M 8.5 20 h 11.5 M 0 0 v 11.5"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- bottom left crop mark --> <fo:block-container position="absolute" left="-12mm" top="297mm" width="12mm" height="12mm"> <!-- top property is set to A4 height --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm"> <svg xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm" viewBox="0 0 20 20" preserveAspectRatio="none"> <g style="fill:none;stroke:black;stroke-width:0.25"> <path d="M 0 0 h 11.5 M 20 8.5 v 11.5"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- bottom right crop mark --> <fo:block-container position="absolute" left="210mm" top="297mm" width="12mm" height="12mm"> <!-- top and left properties are set to A4 height and width --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm"> <svg xmlns="http://www.w3.org/2000/svg" width="12mm" height="12mm" viewBox="0 0 20 20" preserveAspectRatio="none"> <g style="fill:none;stroke:black;stroke-width:0.25"> <path d="M 8.5 0 h 11.5 M 0 8.5 v 11.5"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- left center mark --> <fo:block-container position="absolute" left="-11mm" top="146.5mm" width="4mm" height="4mm"> <!-- top property is set to (A4 height minus picture height) div 2 --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm"> <svg xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm" viewBox="0 0 12 12" preserveAspectRatio="none"> <g style="fill:none;stroke:black;"> <line x1="0" y1="6" x2="12" y2="6"/> <line x1="6" y1="0" x2="6" y2="12"/> <circle cx="6" cy="6" r="4.5"/> </g> <g style="fill:black;stroke:none;"> <circle cx="6" cy="6" r="3"/> </g> <g style="stroke:white;stroke-width:0.25;"> <line x1="3" y1="6" x2="9" y2="6"/> <line x1="6" y1="3" x2="6" y2="9"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- right center mark --> <fo:block-container position="absolute" left="217mm" top="146.5mm" width="4mm" height="4mm"> <!-- left property is set to A4 width plus offset picture --> <!-- top property is set to (A4 height minus picture height) div 2 --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm"> <svg xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm" viewBox="0 0 12 12" preserveAspectRatio="none"> <g style="fill:none;stroke:black;"> <line x1="0" y1="6" x2="12" y2="6"/> <line x1="6" y1="0" x2="6" y2="12"/> <circle cx="6" cy="6" r="4.5"/> </g> <g style="fill:black;stroke:none;"> <circle cx="6" cy="6" r="3"/> </g> <g style="stroke:white;stroke-width:0.25;"> <line x1="3" y1="6" x2="9" y2="6"/> <line x1="6" y1="3" x2="6" y2="9"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- top center mark --> <fo:block-container position="absolute" left="103mm" top="-11mm" width="4mm" height="4mm"> <!-- left property is set to (A4 width minus picture width) div 2 --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm"> <svg xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm" viewBox="0 0 12 12" preserveAspectRatio="none"> <g style="fill:none;stroke:black;"> <line x1="0" y1="6" x2="12" y2="6"/> <line x1="6" y1="0" x2="6" y2="12"/> <circle cx="6" cy="6" r="4.5"/> </g> <g style="fill:black;stroke:none;"> <circle cx="6" cy="6" r="3"/> </g> <g style="stroke:white;stroke-width:0.25;"> <line x1="3" y1="6" x2="9" y2="6"/> <line x1="6" y1="3" x2="6" y2="9"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> <!-- bottom center mark --> <fo:block-container position="absolute" left="103mm" top="304mm" width="4mm" height="4mm"> <!-- left property is set to (A4 width minus picture width) div 2 --> <!-- top property is set to A4 height plus offset picture --> <fo:block font-size="0pt"> <fo:instream-foreign-object xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm"> <svg xmlns="http://www.w3.org/2000/svg" width="4mm" height="4mm" viewBox="0 0 12 12" preserveAspectRatio="none"> <g style="fill:none;stroke:black;"> <line x1="0" y1="6" x2="12" y2="6"/> <line x1="6" y1="0" x2="6" y2="12"/> <circle cx="6" cy="6" r="4.5"/> </g> <g style="fill:black;stroke:none;"> <circle cx="6" cy="6" r="3"/> </g> <g style="stroke:white;stroke-width:0.25;"> <line x1="3" y1="6" x2="9" y2="6"/> <line x1="6" y1="3" x2="6" y2="9"/> </g> </svg> </fo:instream-foreign-object> </fo:block> </fo:block-container> </fo:static-content> <fo:static-content flow-name="xsl-region-end"> <fo:block><!-- margin right content --></fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block>page content</fo:block> </fo:flow> </fo:page-sequence> </fo:root> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
