Re: [NTG-context] issue with external image and PDF/A-3a

2017-10-10 Thread Pablo Rodriguez
On 10/10/2017 04:35 PM, Peter Rolf wrote:
> Just a hint:
> 
> pstoedit seems to be incompatible (uses a deprecated option) with the
> actual gs (v9.22). I tested it with v9.18 and all worked fine. Of course
> the transparency was removed in the process of the eps export. Not a
> real problem with the metapost code at hand.
> 
> pstoedit -v -ssp -f "mpost:" transparent.eps transparent.mp

Many thanks for your reply, Peter.

pstoedit uses a very basic PostScript drawing model that isn’t enough
for the vectors I need to convert.

>> Is that right or could something get lost in the translation?
>>
> All unsupported features (like transparency).

I found the command for the transparency issues:

  \setupcolors[pagecolormodel=auto]

At least, veraPDF doesn’t complain anymore.

Only color profiles for external figures have to be solved.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] issue with external image and PDF/A-3a

2017-10-10 Thread Peter Rolf
Am 05.10.2017 um 22:40 schrieb Pablo Rodriguez:
> On 10/05/2017 09:05 PM, luigi scarso wrote:
>> On Thu, Oct 5, 2017 at 8:18 PM, Pablo Rodriguez wrote:
>>> [...]
>>> Well, this is a minimal sample, but my real document is much bigger. Is
>>> there any way to convert the stream to something that ConTeXt can handle
>>> directly?
>>
>> hm, the only reliable way that I know w is to convert it to a flattened png
> 
> Many thanks for your reply, Luigi.
> 
> The real graphic is a vector logo and I need to keep it as a vector
> image. I converted it from a SVG source into a PDF document (years ago).
> 
> I cannot remember if the vector image contains transparency. If needed,
> I would remove it from the image.
> 
> The way to convert it may be using Inkscape into a PostScript document
> and then to MetaPost using pstoedit (as I have just discovered).
>

Just a hint:

pstoedit seems to be incompatible (uses a deprecated option) with the
actual gs (v9.22). I tested it with v9.18 and all worked fine. Of course
the transparency was removed in the process of the eps export. Not a
real problem with the metapost code at hand.

pstoedit -v -ssp -f "mpost:" transparent.eps transparent.mp

Tested on Windows 10 (1703), Inkscape v0.92.2, gs v9.18, pstoedit v3.70;
all 64bit

> Is that right or could something get lost in the translation?
> 
All unsupported features (like transparency).

> Many thanks for your help,
> 
> Pablo
> 

Best wishes,  Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] issue with external image and PDF/A-3a

2017-10-05 Thread Pablo Rodriguez
On 10/05/2017 09:05 PM, luigi scarso wrote:
> On Thu, Oct 5, 2017 at 8:18 PM, Pablo Rodriguez wrote:
>> [...]
>> Well, this is a minimal sample, but my real document is much bigger. Is
>> there any way to convert the stream to something that ConTeXt can handle
>> directly?
> 
> hm, the only reliable way that I know w is to convert it to a flattened png

Many thanks for your reply, Luigi.

The real graphic is a vector logo and I need to keep it as a vector
image. I converted it from a SVG source into a PDF document (years ago).

I cannot remember if the vector image contains transparency. If needed,
I would remove it from the image.

The way to convert it may be using Inkscape into a PostScript document
and then to MetaPost using pstoedit (as I have just discovered).

Is that right or could something get lost in the translation?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] issue with external image and PDF/A-3a

2017-10-05 Thread luigi scarso
On Thu, Oct 5, 2017 at 8:18 PM, Pablo Rodriguez  wrote:
> Dear list,
>
> I have this minimal sample:
>
> \setupbackend
>   [format=PDF/A-3a,
>intent=sRGB IEC61966-2.1,
>profile={sRGB.icc,default_gray.icc},
>level=0]
>
> \setuptagging[state=start]
>
> \setupcolors[cmyk=no]
>
> \startTEXpage[offset=1em]
> \externalfigure[transparent]
> \stopTEXpage
> \stoptext
>
> The external figure is available from
> http://pdf.ousia.tk/transparent.pdf (and output file at
> http://pdf.ousia.tk/transparent-pdf-a-3a.pdf).
>
> Using veraPDF (http://verapdf.org/), the output document doesn’t comply
> with the validation profile requirements.
>
> As Luigi wisely predicted, external images may be problematic.
>
> I get one error, because of the color of the external figure:
> https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-6243-2.
>
> The PDF object in question is the following:
>
> 12 0 obj
> <<
>   /Type /XObject
>   /Subtype /Form
>   /FormType 1
>   /BBox [ 0 0 316.896 215.5669 ]
>   /Group <<
> /Type /Group
> /S /Transparency
> /I true
> /CS /DeviceRGB
>   >>
>   /Resources 21 0 R
>   /Length 71
> >>
> stream
> q
> 0.188235 0.392157 0 rg /a0 gs
> 28.348 187.219 260.203 -158.871 re f
> Q
> endstream
> endobj
>
> Well, this is a minimal sample, but my real document is much bigger. Is
> there any way to convert the stream to something that ConTeXt can handle
> directly?


hm, the only reliable way that I know w is to convert it to a flattened png
$> convert transparent.pdf -density 300 -colorspace RGB -flatten transparent.png

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] issue with external image and PDF/A-3a

2017-10-05 Thread Pablo Rodriguez
Dear list,

I have this minimal sample:

\setupbackend
  [format=PDF/A-3a,
   intent=sRGB IEC61966-2.1,
   profile={sRGB.icc,default_gray.icc},
   level=0]

\setuptagging[state=start]

\setupcolors[cmyk=no]

\startTEXpage[offset=1em]
\externalfigure[transparent]
\stopTEXpage
\stoptext

The external figure is available from
http://pdf.ousia.tk/transparent.pdf (and output file at
http://pdf.ousia.tk/transparent-pdf-a-3a.pdf).

Using veraPDF (http://verapdf.org/), the output document doesn’t comply
with the validation profile requirements.

As Luigi wisely predicted, external images may be problematic.

I get one error, because of the color of the external figure:
https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-6243-2.

The PDF object in question is the following:

12 0 obj
<<
  /Type /XObject
  /Subtype /Form
  /FormType 1
  /BBox [ 0 0 316.896 215.5669 ]
  /Group <<
/Type /Group
/S /Transparency
/I true
/CS /DeviceRGB
  >>
  /Resources 21 0 R
  /Length 71
>>
stream
q
0.188235 0.392157 0 rg /a0 gs
28.348 187.219 260.203 -158.871 re f
Q
endstream
endobj

Well, this is a minimal sample, but my real document is much bigger. Is
there any way to convert the stream to something that ConTeXt can handle
directly?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___