Well I think the inefficiency is part of the problem, but not entirely. 
Doing File->Save As in Acrobat still doesn't yield a file that prints 
properly, I'm about to test the optimisation in a few variations 
(setting it to PDF 1.3, and various optimisations on/off). It does 
indeed give a nice and small PDF again, but there are differences in 
structure. The first difference is that the one from Save As is 
linearized, while the purely flattened one isn't. Not a big difference, 
and shouldn't have any impact whatsoever, but it does mean a slightly 
different process is applied.

The flattened file puts a lot of things inside streams, but that really 
shouldn't have such a massive effect (it does reduce the overall amount 
from 40 to 35 with this small file). On a sidenote; performing a PDF/X 
validation from within Acrobat on these files makes even Acrobat choke 
on Xeon-based systems (both Windows and OS X), and that's a pretty 
forgiving reader. There is something, somewhere that is causing both the 
RIP and Acrobat choke.

Unfortunately there is no way to switch RIPs right now, these printers 
come with proprietary software and they do not currently provide any 
alternatives apart from an entire workflow package. We are working with 
them to resolve this however, so hopefully they'll figure out where it 
goes wrong on their side soon. They have been very forthcoming so far, 
problem is just that there are other issues that also need their 
attention and it is not halting production here yet, so they can't 
devote all their resources to this issue (policy).

Anyway, thanks for your help so far, even though it's not strictly an 
iText discussion anymore at this point!

Paul

Op 17-1-2011 16:05, Leonard Rosenthol schreef:
> Except for being EXTREMELY inefficient, and an issue with the XMP metadata, 
> there is nothing wrong with this PDF.  And you are right, no annotations.
>
> So when you run that Preflight, it isn't actually doing anything in the 
> Preflight part.  You are simply getting the effect of doing a File->Save As - 
> try it, you'll get the same thing.  That effect is that Acrobat runs an 
> optimization phase over the file doing all sorts of things to get the file 
> size down and make it more efficient - but it won't change the XObject 
> structure of the file.
>
> If the RIP in question isn't processing this file w/o modification, then the 
> RIP does not comply with the PDF standard and I would switch (or get an 
> upgrade) ASAP!
>
> Leonard
>
> -----Original Message-----
> From: Paul Werelds [mailto:p...@werelds.net]
> Sent: Monday, January 17, 2011 9:30 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Flattening / reducing XObjects
>
> Well the odd thing is, I actually looked for Annotations initially when I 
> tried that option. There is not a single Annot key in the file anywhere. 
> Having gone through the file again, the XObjects are all marked as 
> XObject/Form (PrinterMark=true as well), I am now going to compare the actual 
> objects to see how they have been changed exactly.
>
> I have tried both FormFlattening and PartialFormFlattening through 
> PdfStamper, but neither has the same effect on file size as Acrobat's 
> flattening option. I've attached an example file which we created with 
> InDesign and ran through Apogee; after applying Acrobat's flattening (version 
> 9 btw, which I only just noticed does not include a trailer in the new file) 
> you'll notice that the size goes down from 239KB to 74KB - on the big files 
> it takes the files down from 150MB to 10-15MB.
>
> However, using PdfCopy with SetFullCompression() does yield an even slightly 
> smaller file, unfortunately that file still won't print.
> The problem is very odd, because I do not understand why AGFA chose this 
> approach, or why the printer's RIP can't handle it for that matter.
> Unfortunately both AGFA and the manufacturer will need some time to figure 
> this out and roll out a patch, so I'm just looking for the cause of the 
> problem and a way around it in the meantime. The problem does not lie with 
> the number of pages, nor with filesize, it's a structural problem.
>
> Anyway, thanks for your reply so far!
>
> Paul
>
> Op 17-1-2011 15:15, Leonard Rosenthol schreef:
>> If Acrobat's "Flatten Annotations" feature is working, then the problem is 
>> _NOT_ with XObjects, but with Annotations.  XObjects can (and are) used by 
>> as part of page content in many cases and "flattening" them is a very 
>> complex process, which is one reason that (almost) no one does it.
>>
>> However, flattening annotations as part of the printing process, is a very 
>> common operation and supported by NUMEROUS software products including 
>> iText.  Check the docs, but there is an API call that will do it.
>>
>> BUT...
>>
>> I am surprised to hear that Apogee is doing that.  Can you check your 
>> settings in Apogee about how it adds the various elements on the pages, 
>> since use of annotations in a printing process is NOT the norm.
>>
>> Leonard
>>
>> -----Original Message-----
>> From: Paul Werelds [mailto:p...@werelds.net]
>> Sent: Monday, January 17, 2011 7:25 AM
>> To: itext-questions@lists.sourceforge.net
>> Subject: [iText-questions] Flattening / reducing XObjects
>>
>> I am currently doing my graduation on a project for a printing
>> company, which involves JDF and obviously, PDF. I'll admit right now
>> that I'm still very much a newbie to PDF, it wasn't until the problem
>> below popped up that I started analysing the internals of PDF files.
>>
>> Their documents are processed by AGFA's ApogeeX, and the plan is to
>> send them directly to the printers over LPR, accompanied by a JDF ticket.
>> However, in my testing I came across a problem; the PDF files created
>> by ApogeeX are pretty complex (details below) and the printers can't
>> handle them. Up to 30-40 pages it *might* work (but sometimes even
>> 2-page files fail), but beyond that it can't RIP the files anymore.
>> The RIP software is proprietary, and I have no control over it whatsoever.
>>
>> The input documents are pretty simple, mostly text really, spread
>> across a good 600 pages or so - no forms and only a handful of images.
>> They typically come from InDesign, but these documents are no problem
>> for the printer. The main thing ApogeeX does is imposition, and it
>> does so by putting a whopping 19 XObjects on each page, in addition to
>> the original document's page contents. These XObjects are cut markers
>> and two job/time stamps on the short sides of the sheets. When I do
>> the imposition with Quite Imposing or Creo Preps the files print fine,
>> and they (can) also include the cut markers. On top of that, the files
>> created by ApogeeX are excessively large; a 600 page PDF becomes about
>> 150 MB. This is not the cause of the problem however, as we have tried
>> optimising them in Acrobat, ran them through GhostScript and all sorts
>> of things which resulted in much smaller files, but none of those
>> worked either, with one exception described below.
>>
>> I have consulted with the printer manufacturer as well, and they
>> suggested flattening the XObjects. While I'm in the process of testing
>> whether this works by manually doing that, I was wondering if there's
>> a quicker way to do this through iText?
>> Their exact suggestion was to eliminate the XObjects by replacing them
>> by their content streams, preceded by their transformation matrix.
>>
>> I have done a quick test by running the ApogeeX files through
>> Acrobat's Preflight ->   Flatten Annotations and Form Fields, and those
>> print just fine while still retaining the cut markers, stamps and
>> content with no visual anomalies. Obviously we are working with both
>> AGFA and the printer manufacturer to determine the exact cause of the
>> problem (and to get a solution implemented once we do), running every
>> file through Acrobat's Preflight is undesirable. I have been comparing
>> the files created by the various pieces of software, so that alone is
>> pretty time consuming, hence my mailing to this list in order to get
>> some help to speed it up a bit on the programming side of things.
>>
>> Example files I can provide if there's anyone willing to try and
>> assist me in this, because like I said I'm still very new to PDF. I've
>> used iText before, but never went this deep into PDF with it.
>>
>>
>> ----------------------------------------------------------------------
>> -------- Protect Your Site and Customers from Malware Attacks Learn
>> about various malware tactics and how to avoid them. Understand
>> malware threats, the impact they can have on your business, and how
>> you can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Many questions posted to this list can (and will) be answered with a
>> reference to the iText book: http://www.itextpdf.com/book/ Please
>> check the keywords list before you ask for examples:
>> http://itextpdf.com/themes/keywords.php
>>
>> ----------------------------------------------------------------------
>> -------- Protect Your Site and Customers from Malware Attacks Learn
>> about various malware tactics and how to avoid them. Understand
>> malware threats, the impact they can have on your business, and how
>> you can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Many questions posted to this list can (and will) be answered with a
>> reference to the iText book: http://www.itextpdf.com/book/ Please check the 
>> keywords list before you ask for examples: 
>> http://itextpdf.com/themes/keywords.php
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Many questions posted to this list can (and will) be answered with a 
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to