Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When writing .ocd file all color layers are have the "overprint" flag set #2228

Open
FinnAr opened this issue Apr 14, 2024 · 14 comments
Open

Comments

@FinnAr
Copy link

FinnAr commented Apr 14, 2024

Steps to reproduce

  1. Save a file as .ocd

Actual behaviour

The written file has the "overprint" flag set for all color layers

Expected behaviour

The color layers would be marked with "overprint" if the "KO" flag is not set for that color layer in Mapper, and vice versa

Configuration

Mapper Version: 0.9.5
Operating System: Windows 11

@dl3sdo
Copy link
Member

dl3sdo commented Jun 18, 2024

@FinnAr: I did the following test with Mapper 0.95 and OCAD12:

  • Export forest_sample as .ocd (OCAD12) file
  • Check color settings in OCAD: colors in Mapper with 'K.o.' set are imported as 'Ov.' not set and vice versa
  • Save forest_sample.ocd in OCAD
  • Open file in Mapper to check the round-trip behaviour => everything is working as expected

Thus, I cannot reproduce the issue and also the code to export to .ocd has no pecularities.

Can you provide more details or even test files?

@DaveIR
Copy link

DaveIR commented Aug 24, 2024

I have the same issue.
I have a map that is originally in OCAD (version unknown).

I can open the map and save it as omap

I can also save the map as OCAD but when I import the map into CONDES (10.5.11) I get the error saying that all colour layers have overprint set. I can see the effect in CONDES in the attached example where the road junction in the E doesn't have the black edges suppressed and the dark green overlaps the road to the NE of the building.

If I export to OCAD 8 format this does not happen, but any higher OCAD version export (9 to 12) does have the issue.

Omapper_Layers
Path

Windows 10 Pro
Mapper 0.9.5

@dl3sdo
Copy link
Member

dl3sdo commented Aug 24, 2024

I notice in the Condes history of version 10.5.9:

When printing, overprint flag on white OCAD map color layers was NOT ignored. White OCAD map color layers flagged as “overprint” would not be visible when printing.
Note: OCAD files edited in Open Orienteering Mapper will get overprint flags on all colour layers. This can be considered a bug in Open Orienteering Mapper – be careful to check this.

@FinnAr
Copy link
Author

FinnAr commented Aug 24, 2024 via email

@dl3sdo
Copy link
Member

dl3sdo commented Aug 24, 2024

Hi @FinnAr: I still can't reproduce the issue:
I just imported an .ocd12 file (which was never touched by Mapper) and exported it to .ocd12 => 'overprint' flags are ok. The same happened for an .ocd18 file which I exported to .ocd12.

The code looks good to me: "\to" << (color.getKnockout() ? '0' : '1')
Actually the 'Knockout' resp. 'K.o.' setting in Mapper is the opposite of the 'overprint' property of OCAD.
Thus, when you open any of the affected .ocd maps before and after exporting to .ocd: Are the 'K.o.' checkmarks in Mapper ok?

Could you provide such a map to me (maybe by exporting a small piece?) since the issue should be independent from the number of objects and just depend on the colors.

@FinnAr
Copy link
Author

FinnAr commented Aug 24, 2024 via email

@dl3sdo
Copy link
Member

dl3sdo commented Aug 24, 2024

@FinnAr: I just installed Condes (I assume that you are the author) and got no warning, which is not surprising as the maps look good in OCAD (i.e., not all 'overprint' flags are set).
@DaveIR: can you provide a sample?

@dl3sdo
Copy link
Member

dl3sdo commented Aug 25, 2024

@DaveIR: I deleted your attachment, as it contains the whole map which was not intended I guess. Always clear the undo history, otherwise the original map can be restored.
P.s.: editing your comment does not help, thus I deleted your comment and pasted it below. Sorry for the confusion.

@OpenOrienteering OpenOrienteering deleted a comment from DaveIR Aug 25, 2024
@dl3sdo
Copy link
Member

dl3sdo commented Aug 25, 2024

from @DaveIR:
Hi Both,

Thanks for engaging with this.
The attached zip contains a map extract in mapper, and two exports of the file, one to OCAD 8 and the other to OCAD 12. The OCAD 8 opens fine in CONDES and looks OK, but the OCAD 12 has warnings when opened in CONDES and looks a mess e.g. the road junctions.
I don't have the untouched original OCAD, but hope this is enough to highlight the issue.
Thanks
Dave

@dl3sdo
Copy link
Member

dl3sdo commented Aug 25, 2024

At a first glance: the .omap does not contain any spot colors, thus the Knockout property will always be not set and thus the 'overprint' flag will always be set when exporting to .ocd.
Regarding the road junctions:
In the .ocd file the 'Street infill' is above the 'Street borderlines' in the color order, thus hiding the black color. If you swap these colors, then OCAD renders it as Condes does.
How does Condes handle the order of colors?
However, if you unset overprint on these two colors, then Condes renders as OCAD and it looks fine.

@FinnAr
Copy link
Author

FinnAr commented Aug 25, 2024 via email

@dl3sdo
Copy link
Member

dl3sdo commented Aug 25, 2024

On export don't set the 'overprint' flag for colors without spot colors?

@FinnAr
Copy link
Author

FinnAr commented Aug 25, 2024 via email

@lpechacek
Copy link
Member

lpechacek commented Sep 15, 2024

I've stumbled over the overprint topic too. I also thought that overprint applies to the spot color rendering where it controls how the spot color separations are rendered. But a simple test made me search further:

Screencast.from.2024-09-15.19-35-58.webm

As you can see, OCAD Viewer ignores the overprint flag in spot color mode and happily blends the colors together. Mapper obeys the overprint flag and renders the example map identically in normal and spot color modes. Is it really that Viewer ignores the flag? Nope. The flag has a different meaning. Citing from OCAD 8 help page:

O (Overprint)
Overprinting is normally used for the black color, when printing a map with 4 colors (CMYK). When overprinting is chosen, the other CMYK separations are not blocked out (no white lines/areas where the black is). Overprinting only affects color EPS files, CMYK separations and Adobe Illustrator files.

I'd say that Mapper is interpreting the color overprint flag wrong. The overprint effect applies to PDF objects. Mind that OCAD does not display the effect. It's visible only in the exported content.

Solution for Mapper: 1) Remove the "knockout" functionality from Mapper's spot color rendering code. 2) Adjust Mapper's native symbol sets to treat overprint as a PDF/Postscript functionality. 3) (optional) Implement overprint effects in Mapper's PDF output.

And how do we "knock out" a spot color then? ... By setting the spot color to 0% in the color definition.

I hope I'm not off the mark. I'm tired by staring into the symbol set topics for the second day. Not much fun it is... :-|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants