You are not logged in.
Pages: 1
Hello,
I use the following code to convert a bunch of TIFF-Files to PDF/A-1b.
uses
SynPDF
, SynGdiPlus
;
procedure TForm1.Button1Click(Sender: TObject);
var
pdfDoc: TPdfDocument;
pdfpage: TPdfpage;
pdfImage: TPdfImage;
tiffimage: TTIFFImage;
i: integer;
begin
pdfDoc := TPdfDocument.Create(False, 0, True, Nil);
pdfDoc.Info.Author:='';
pdfDoc.Info.Creator:='';
pdfDoc.DefaultPaperSize:=psA4;
pdfDoc.ForceJPEGCompression:=0;
pdfDoc.CompressionMethod:=cmFlateDecode;
tiffimage := TTIFFImage.Create;
for i:=1 to 3 do begin
tiffimage.LoadFromFile(IntToStr(i)+'.tif');
pdfpage:=pdfDoc.AddPage;
pdfpage.PageWidth:=Round(tiffimage.Width *0.73);
pdfpage.PageHeight:=Round(tiffimage.Height * 0.73);
pdfImage:=TPdfImage.Create(pdfDoc,tiffimage,true);
pdfDoc.AddXObject('image'+AnsiString(IntToStr(i)), pdfimage);
pdfDoc.Canvas.DrawXObject(0,0,pdfpage.PageWidth,pdfpage.PageHeight,'image'+AnsiString(IntToStr(i)));
end;
pdfDoc.SaveToFile('output.pdf');
pdfDoc.Free;
end;
The code works fine and I get an PDF/A-1b but if I do a preflight-check with Adobe Acrobat to check the the PDF/A1-b compliance I get several errors:
The separator before 'endstream' must be an EOL. (4)
xmp:CreateDate :: Wrong value type. Expected type 'Date'.
xmp:ModifyDate :: Wrong value type. Expected type 'Date'.
The document does not conform to the requested standard.
The file format (header, trailer, objects, xref, streams) is corrupted.
The document's meta data is either missing or inconsistent or corrupt.
What must be done to produce a valid PDF/A?
Thanks
Stefan
Offline
Hi,
I have the same problem but with a metafile:
xPDF.AddPage;
xPDF.Canvas.RenderMetaFile(MyMeta);
I try to validate the generated PDF/A file at http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx
But the validator also shows the same problem that you mentioned.
Kind regards,
Márcio Koch
Offline
We tried to fixed the reported problems.
See http://synopse.info/fossil/info/02e9461c6c0d39d
Thanks for the feedback!
Offline
Thanks, the fix solved the problem, now passed at the validator.
Offline
Pages: 1