PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

IntersectClip results do not appear in Fiery RIP Software
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4627
Page 1 of 1

Author:  ciung [ Tue Jul 16, 2024 8:15 am ]
Post subject:  IntersectClip results do not appear in Fiery RIP Software

I tried making an imposition program using PDFsharp, the program reads the media box and trim box on the source PDF file, the source PDF will be clipped mask (IntersectClip) and imposed.
The program runs well. The resulting PDF is exactly what I wanted, all the impositions appear, and have been opened by several PDF Viewers/Editors, even when the PDF file resulting from the imposition is opened in Adobe Illustrator or Corel Draw, the results remain the same as when opened in the PDF Viewer.

However, there is a problem with the results of IntersectClip, where the source PDF object (XPdfForm) that has been IntersectClip and imposed, does not appear in the RIP Fiery software preview and the printed results.

This is the code I use:

Code:
Dim ResFile As String = PDFlink.namaPDFlink
Dim form As XPdfForm = XPdfForm.FromFile(ResFile)

 Dim outputDocument As PdfSharp.Pdf.PdfDocument = New PdfSharp.Pdf.PdfDocument()
 outputDocument.Options.ColorMode = PdfColorMode.Cmyk
 outputDocument.Options.UseFlateDecoderForJpegImages = PdfUseFlateDecoderForJpegImages.Never
 outputDocument.Options.FlateEncodeMode = PdfFlateEncodeMode.Default
 outputDocument.Options.EnableCcittCompressionForBilevelImages = False
 outputDocument.Options.CompressContentStreams = False
 outputDocument.Options.NoCompression = False

'.......

gfx.Save()
Dim box As XRect
box = New XRect(PosX - ob.Bleed, PosY - ob.Bleed,
                        ob.trimboxWidth + (ob.Bleed * 2), ob.trimboxHeight + (ob.Bleed * 2))

Dim clipPath As XGraphicsPath = New XGraphicsPath()
clipPath.AddRectangle(box)
gfx.IntersectClip(clipPath)

gfx.DrawImage(form, PosX - ((ob.mediaboxWidth - ob.trimboxWidth) / 2), PosY - ((ob.mediaboxHeight - ob.trimboxHeight) / 2), ob.mediaboxWidth, ob.mediaboxHeight)
gfx.Restore()



Anyway thank you so much for helping out!
Best regards,
Ciung

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/