Delphi-Quellcode:
procedure WhyIsItNotWorking;
var
Stream : TBytesStream;
b : TBytes ;
begin
Stream := TBytesStream.Create;
Stream.LoadFromFile( AttachedPDF );
b := Stream.Bytes ;
Stream := TBytesStream.Create( b );
Stream.SaveToFile( AttachedPDF + '2' );
FreeAndNil(Stream);
end;
2nd file is corrupted. there is a bunch of wrong bytes at the end of the file. if you notepad the 2nd pdf and remove said bytes. everything is normal
http://rghost.net/private/67PGPC8QF/...ccaf86fec0bb41
this is a form/fillable pdf
above code works with 'regular' pdf