26. April 2013 11:17
CR := 10;
LF := 13;
//DELETE the FDF File if it exists
IF FILE.EXISTS(Path + FDFFile) THEN
IF NOT FILE.ERASE(Path + FDFFile) THEN
ERROR(TextEraseFail);
TextFile.TEXTMODE(FALSE);
IF NOT TextFile.CREATE(Path + FDFFile) THEN
ERROR(TextCreateFail);
TextFile.CREATEOUTSTREAM(OutStream);
OutputText.ADDTEXT('%FDF-1.2');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF)); //Carriage Return + Line Feed
OutputText.ADDTEXT('1 0 obj');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF));
OutputText.ADDTEXT('<</FDF<</F('+PDFFile+')/Fields['); //beginning of formular fields
OutputText.ADDTEXT('<</T(Kontrollkästchen10)/V/Off>>');
OutputText.ADDTEXT('<</T(Kontrollkästchen11)/V/Off>>');
OutputText.ADDTEXT('<</T(Name)/V(Frau Mustermann)>>'); //Name
OutputText.ADDTEXT('<</T(Telefon)/V(0911-12345-0)>>'); //Telefonnummer
OutputText.ADDTEXT('<</T(Text2)/V(Dummy Auftragnehmer)>>'); //Auftragnehmer
OutputText.ADDTEXT('<</T(VSNR)/V(Test12345)>>'); //Versicherungsnummer
OutputText.ADDTEXT(']/ID[<4334374142454336413234454332453343393645364435383541333630424137>'); //end of formular fields
OutputText.ADDTEXT('<9AD7B6F24C51994CA65857A2EDE809EC>]');
OutputText.ADDTEXT('/UF(Avalauftrag_Kautionsversicherung.pdf)>>/Type/Catalog>>');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF));
OutputText.ADDTEXT('endobj');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF));
OutputText.ADDTEXT('trailer');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF));
OutputText.ADDTEXT('<</Root 1 0 R>>');
OutputText.ADDTEXT(FORMAT(CR)+FORMAT(LF));
OutputText.ADDTEXT('%%EOF');
OutputText.WRITE(OutStream);
TextFile.CLOSE;
HYPERLINK(Path + FDFFile);
26. April 2013 11:40
OutputText.ADDTEXT('<</T(Name)/V('+GeneralMgt.Ascii2Ansi('Jörg Reißlein')+')>>'); //Name
26. April 2013 13:16
Navision erzeugt das FDF als ANSI kodiert (laut Textpad).