Igor Vernelen wrote:
> Hi,
> 
> All objects are closed correctly and we get a document with size > 0kb.

OK.

> The document opens in most cases correctly but for some users adobe 
> reader gives the error "file does not begin with %PDF". If we open the 
> file with notepad it indeed doesn't show the "%PDF <version>" in the 
> beginning.

What does it show instead?

> We have been doing some text and if we use
> stamper.setFormFlattening(false);
> we get a "well-formed" PDF-document.
> 
> If we use
> stamper.setFormFlattening(true);
> we get a pdf-document without the %PDF<version> in the beginning.
> 
> The content of the document looks like the document registerd_flat.pdf 
> that is on
> http://itextdocs.lowagie.com/tutorial/general/copystamp/index.html

When I open registered_flat.pdf in Notepad, it begins like this:
%PDF-1.4
%âãÏÓ
1 0 obj <</Matrix [1 0 0 1 0 0]/Filter/FlateDecode
What do you see whan you open that file?

> It seems that adobe reader 7 requires the %PDF to be in the document, 
> adobe reader 6 doesn't require this because using Adobe Reader 6 the 
> documents open correctly.

Every PDF file should open with %PDF
As far as I know every iText generated/manipulated PDF does.
Please provide an example that helps us reproduce the problem.
I repeat: when I open this file:
http://itext.ugent.be/library/com/lowagie/examples/general/copystamp/registered_flat.pdf
It looks fine. Are you sure we're talking about the same file?
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to