#1 PDF Engine » Extended RTF formatting not saved with SynPDF » 2015-05-03 13:44:47

PeterPanino
Replies: 1

Hi! Create an RTF document file (e.g. in MS Word 2010) containing formatted text and an image. In Delphi XE7 (or Delphi XE8), load this RTF file in a TJvRichEdit:

procedure TForm1.btnLoadRTFClick(Sender: TObject);
begin
  JvRichEdit1.Lines.LoadFromFile(edtRTFFileToConvertToPDF.Text);
end;

RTF file loaded in TJvRichEdit

Then, with SynPDF save it to a PDF document:

uses mORMotReport;
...
with mORMotReport.TGDIPages.Create(Self) do
begin
  try
    BeginDoc;
    AppendRichEdit(JvRichEdit1.Handle);
    EndDoc;
    ExportPDF('R:\Exported.pdf', True, False);
  finally
    Free;
  end;
end;

This saves the format attributes Bold, Italic, Underlined and Text Color in the PDF, but NOT the Text Background Color:

PDF file created from TJvRichEdit with SynPDF

So how can I save ALL text formattings in the exported PDF?

Board footer

Powered by FluxBB