문제

is it possible to use CMYK overprinting without using the CMYKColorSep class, which always generates a new seperate color in the printer settings, i just want to use overprinting with the standard 4 CMYK inks (colour-separated PDF output, as stated in the 2.4 changelog)

here my example code (reportlab 2.4 needed):

from reportlab.graphics.shapes import Rect
from reportlab.lib.colors import PCMYKColor, PCMYKColorSep
from reportlab.pdfgen.canvas import Canvas

black = PCMYKColor(0, 0, 0, 100)
blue  = PCMYKColor(91.0,  43.0,  0.0, 0.0)
red   = PCMYKColorSep( 0.0, 100.0, 91.0, 0.0, spotName='PANTONE 485 CV',density=100)
red2   = PCMYKColor( 0.0, 100.0, 91.0, 0.0, knockout=0) #knockout does nothing?

c = Canvas('test.pdf', (420,200))
c.setFillColor(black)
c.setFont('Helvetica', 10)
c.drawString(25,180, 'overprint w. CMYKColorSep')
c.setFillOverprint(True)
c.setFillColor(blue)
c.rect(25,25,100,100, fill=True, stroke=False)
c.setFillColor(red)
c.rect(100,75,100,100, fill=True, stroke=False)
c.setFillColor(black)
c.drawString(225,180, 'overprint w. plain CMYKColor (does not work)')
c.setFillColor(blue)
c.rect(225,25,100,100, fill=True, stroke=False)
c.setFillColor(red2)
c.rect(300,75,100,100, fill=True, stroke=False)
c.save()

note: you need to enable the overprinting preview in acrobat reader pro to correctly view this.

if this does not work with reportlab, do you know any other server-side alternative to generate pdf, where overprinting does work?

thank you very much

도움이 되었습니까?

해결책 2

this feature is not implemented in Reportlab 2.4. But they will do it with their next major release.

다른 팁

You can only use overprint with CMYKColorSep. Its currently available in 2.4 but not stable (Robin is still messing with the code :) ).

There is a non public snippet on the reportlab website http://www.reportlab.com/snippets/10/ that demos it but hence the feature is still in development the snippet is not listed.

Meitham

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top