Error when printing RichEdit Fields to PDF
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
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
This discussion has been closed.
Comments
Report.PDFSettings.OptimizeImageExport := false;
everything works fine. But thats not a real solution to the problem, just a
workaround.
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com