On 04/01/14 02:42, Alex Korobkin wrote: > > 2014/1/3 Adrian Johnson <[email protected] <mailto:[email protected]>> > > On 03/01/14 15:15, Ross Moore wrote: > > Hi Adrian, > > > > On 03/01/2014, at 10:01 AM, Adrian Johnson wrote: > > > >> Leonard, > >> Do you have any idea why Adobe Distiller fails on the PS output? > The PS > >> files print fine on my Xerox printer which has Adobe PS. > > > > The error occurs in the PostScript around lines 44378-44379 > <tel:44378-44379>. > > Comment out these 2 lines and the file will distill just fine. > > > > The lines commented-out should look like: > > > >>> % imagemask > >>> % Gar8O!!3<."p5&6Mu*H<lMpm`s8T;%s*la!#Nl!cb6!e-!5&ILgA~> > > > > Of course this omits something on page 4. > > It is the red arrow indicating where a signature is required. > > > > This seems to have been added over the top of the underlying form, > > using coding that looks a bit suspect to me. > > viz. > > > >>> 8 dict dup begin > >>> /ImageType 1 def > >>> /Width 24 def > >>> /Height 15 def > >>> /Interpolate false def > >>> /BitsPerComponent 1 def > >>> /Decode [ 1 0 ] def > >>> /DataSource currentfile /ASCII85Decode filter /FlateDecode > filter def > >>> /Interpolate false def > >>> /ImageMatrix [ 1 0 0 -1 0 15 ] def > >>> end > >>> imagemask > >>> Gar8O!!3<."p5&6Mu*H<lMpm`s8T;%s*la!#Nl!cb6!e-!5&ILgA~> > > > > Firstly there are 9 entries being defined within the dictionary, > > but then /Interpolate is given twice. > > > > The /DataSource line looks quite wrong. > > "DataSource must be a single file, procedure, or string" > > --- PS Ref. Manual v3 > > so maybe this will do: > > /DataSource {currentfile /ASCII85Decode filter /FlateDecode > filter} def > > but when testing the same /undefined error occurs with imagemask , > > which could indicate something wrong in the preceding dictionary. > > > Ross, > thanks a lot for the detailed analysis. > > > I tried turning it into a procedure and it fails with ghostscript and my > printer. It turns out it was correct. See example 4.26 on p311 of the PS > Ref. > > Adrian, > I'm not sure I fully understand your answer. Do you think this > PostScript code is actually correct?
The PostScript code is correct. I've updated cairo to remove the duplicate /Interpolate but it was not incorrect. According to p568 of the PLR if "def" is used when the key already exists the existing value is overwritten. So the dict size of 8 is not exceeded but even if it was according to p572 with language level 2 and 3 the dict size is automatically increased if the initial size is exceeded. The DataSource is correct. The filter operator returns a file object. The sequence "currentfile /ASCII85Decode filter /FlateDecode" results in a single file object on the stack which meets the requirement that the data source must be a file, procedure, or string. Another observation is that the PS output you attached is not the direct output of pdftocairo. It has CUPS stuff inserted into it. Maybe you could try printing with the pdftocairo output without any additional filtering to see if it makes a difference. See the lpr man page. Something like "lpr -l" should bypass all filtering. > > 2014/1/3 Leonard Rosenthol <[email protected] <mailto:[email protected]>> > > >Ricoh says that if it cannot be read by Distiller, it won't be > processed > >by printers. > > > Ricoh is just looking to place blame - this is simply false. Even > more so > because all of our printer OEM's do a LOT of customization of the > technology that they receive in order to differentiate their > products from > each other. > > > Leonard, > Thanks, I'm not looking to blame anyone, I'm just trying to file a bug > report to a correct place. I'm still unsure if this is something wrong > in the original PDF, or is it to be reported to poppler or cairo teams, > or maybe Distiller is unable to process a piece of valid PostScript code. > > > > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler > _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
