logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
gffranca Posted: Tuesday, January 13, 2026 10:01:20 AM(UTC)
 
I also found manipulating Color Separations tricky; it often requires diving deep into the PDF specifications. I believe newer versions of the SDK might expose this information directly within the PageObject properties.

However, a viable workaround is to iterate through the PageObjects list, identify objects with the specific color, and modify their matrix to hide them. There is a relevant discussion on that approach here: Manipulating PdfPageObject (Click Here)

Regarding the mouse click functionality, the logic is quite similar. You can review this thread for the implementation details: Extract image under mouse pointer (Click Here)

Suriya Prakash Posted: Sunday, January 11, 2026 11:17:18 PM(UTC)
 
'Remove Color' means removing the colors that are used in the PDF one by one. Eg . CMYK colors, pantone colors etc..., And as for 'Remove Objects' i want to remove a object from the pdf where the mouse cursor is clicked. If you any idea about this it would be helpful and thanks for the above info that helped me a lot.
gffranca Posted: Friday, January 9, 2026 5:37:50 PM(UTC)
 
I'm not sure what you mean by 'remove objects and colors'.

This topic might be useful for remove/hide objects.
Suriya Prakash Posted: Thursday, January 8, 2026 10:51:49 PM(UTC)
 
Do you also know a way to remove objects and colors from the PDF ?
gffranca Posted: Thursday, January 8, 2026 8:04:59 AM(UTC)
 
I use the following function to handle the overprint preview toggle.

Code:

private void ProcessOverprintLogic(PdfPage page)
{
    // Ensure the backup dictionary exists for this page
    if (!_objectStateBackup.ContainsKey(page.Handle))
        _objectStateBackup[page.Handle] = new Dictionary<IntPtr, BlendTypes>();

    var pageBackup = _objectStateBackup[page.Handle];

    if (_enableOverprint)
    {
        // --- ENABLE SIMULATION ---
        foreach (PdfPageObject pageObj in page.PageObjects)
        {
            if (pageObj.StrokeOverprint || pageObj.FillOverprint)
            {
                // Save original state if not already saved
                if (!pageBackup.ContainsKey(pageObj.Handle))
                {
                    pageBackup[pageObj.Handle] = pageObj.BlendMode;
                }

                // Apply simulation
                pageObj.BlendMode = BlendTypes.FXDIB_BLEND_MULTIPLY;
            }
        }
    }
    else
    {
        // --- DISABLE SIMULATION (RESTORE ORIGINALS) ---
        foreach (PdfPageObject pageObj in page.PageObjects)
        {
            // Only revert objects previously modified
            if (pageBackup.ContainsKey(pageObj.Handle))
            {
                BlendTypes originalBlend = pageBackup[pageObj.Handle];

                // Restore original blend mode
                pageObj.BlendMode = originalBlend;
            }
        }
    }
}
Suriya Prakash Posted: Wednesday, January 7, 2026 11:19:31 PM(UTC)
 
I also do the same by changing the blend mode of the every object to Multiply but some samples do have this issue where a blue layer is formed above it or else it look totally different from the adobe viewer when the overprint preferences is set to always. And can you share me the code that you used to modify the objects
gffranca Posted: Wednesday, January 7, 2026 4:55:30 PM(UTC)
 
I also faced this issue, and I managed to achieve a result that is satisfactory for my needs.

For a high-fidelity overprint simulation, I am actually using Ghostscript.

However, using strictly the Patagames SDK, I was able to get a very decent result. I found that simply defining the viewer blend mode as Multiply (as you mentioned) was not enough. Instead, I had to programmatically modify the blend mode to Multiply for all pdf objects that have the overprint flag defined.


Result using only Patagames SDK:

Result: Patagames SDK - Overprint Preview
Suriya Prakash Posted: Monday, December 29, 2025 11:28:38 PM(UTC)
 
Actually we are trying to view a overprint PDF using the patagames SDK winforms viewer where the PDF designer suggest to turn on overprint preview to see the content in Adobe but we want to show that in patagames viewer. Is there any option similar to the overprint preview in the patagames viewer. For now we are using the blend mode of the object to BlendTypes.FXDIB_BLEND_MULTIPLY to see the full content but it is not accurate and some normal PDF display differently under this circumstances.