Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Error when printing RichEdit Fields to PDF

edited March 2008 in General
Hello,

i have a very small report, only containing a RichEdit Control.
This Control has the following content:
RichText =
'{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fp' +
'rq2\fcharset0 Arial;}{\f1\fswiss\fprq2\fcharset0 Calibri;}{\f2\f' +
'nil Tahoma;}}'#13#10'{\colortbl
;\red128\green128\blue0;}'#13#10'\viewkind4\' +
'uc1\pard\sa200\sl276\slmult1\cf1\ul\i\f0\fs20 x\cf0\i0\f1\fs22\p' +
'ar'#13#10'\pard\ulnone\f2\fs16\par'#13#10'}'#13#10

which is only the letter "x" with attribute "underline", copied from Word.

When I try to print this Report to Pdf, I get the error
"Bereichsüberschreitung bei Zeilenindex" (EInvalidGraphicOperation)
I tracked down the error in source code TXAll.pas:

procedure TPDFFormat.WriteBMP(ImgObj: String; B: TBitmap; Mask: Boolean);
..
if (FOptions.ImageFormat = riJPEG) and (not BW) then begin
JP := TJPEGImage.Create;
JP.Assign(B);
JP.SaveToStream(MemStream); <--- this one produces the error!
JP.Free;
end else begin

I am using Report Builder 10.06. What am I doing wrong?

Kind regards,
Wolfgang Hanke

Comments

  • edited March 2008
    If i include the following line

    Report.PDFSettings.OptimizeImageExport := false;

    everything works fine. But thats not a real solution to the problem, just a
    workaround.

  • edited March 2008
    Hi Wolfgang,

    TXAll is a TExtraDevices unit and does not belong to ReportBuilder. I am
    unsure why changing the PDFSettings.OptimizeImageExport property is
    effecting the TExtraDevices classes because they are unrelated. You will
    need to contact Waler support for help with their product.

    Have you tried exporting using the native RBuilder PDF export?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.