Sorry, what was the problem with the link that I sent ?
Beiträge von mbertolani
-
-
there's a bug when I compile wptools 8.05.2 with Delphi 7,
the list show strange caracteres instead "1,2,3..."
the same code works on Berlin,
tks
-
Perfect !!! Thank You!
-
*** just a side note: Install a virtual printer (PDF) to do the tests
-
the problem continues, try verify what the "PrintDialog" do, that "Print" don't do.
procedure TForm1.lButton2Click(Sender: TObject);
begin
WPRichText1.UpdatePrinterProperties(Printer, 0);
WPRichText1.Print;
end;Regards
-
The theory is simple, but I'll prove that have a bug in Print method (and maybe very old) when working with documents with diferent paper sizes
I'm send my code below, use the files in the link to test,
http://gdicomvix.zapto.org/download/wptools/super01.rtf
http://gdicomvix.zapto.org/download/wptools/super02.rtfif you open and print the super02.rtf only, it works !! Paper in printer with same size of original document.
if you open and print the super01.rtf first, and after, open and print super02.rtf , it not works.regards
-------------PAS
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, WPRTEDefs, WPCTRMemo, WPCTRRich, StdCtrls, ExtCtrls;type
TForm1 = class(TForm)
ToolPanel1: TPanel;
Button1: TButton;
lButton2: TButton;
WPRichText1: TWPRichText;
procedure Button1Click(Sender: TObject);
procedure lButton2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var Od: TOpenDialog;
begin
Od := TOpenDialog.Create(nil);
if Od.Execute then
WPRichText1.LoadFromFile(Od.FileName, True);
Od.Free;
end;procedure TForm1.lButton2Click(Sender: TObject);
begin
WPRichText1.Print;
end;end.
-----------------DFM
object Form1: TForm1
Left = 476
Top = 125
Width = 882
Height = 655
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object ToolPanel1: TPanel
Left = 0
Top = 584
Width = 866
Height = 32
Align = alBottom
BevelInner = bvLowered
BevelOuter = bvSpace
TabOrder = 0
object Button1: TButton
Left = 7
Top = 6
Width = 61
Height = 20
Caption = 'Open'
TabOrder = 0
OnClick = Button1Click
end
object lButton2: TButton
Left = 72
Top = 6
Width = 61
Height = 20
Caption = 'Print'
TabOrder = 1
OnClick = lButton2Click
end
end
object WPRichText1: TWPRichText
Left = 0
Top = 0
Width = 866
Height = 584
RTFVariables = <>
ProtectedProp = []
InsertPointAttr.TextColor = clRed
InsertPointAttr.UseTextColor = True
HyperlinkTextAttr.Underline = tsTRUE
HyperlinkTextAttr.UnderlineColor = clBlue
HyperlinkTextAttr.UseUnderlineColor = True
HyperlinkTextAttr.HotUnderlineColor = clRed
HyperlinkTextAttr.HotTextColor = clRed
HyperlinkTextAttr.HotUnderline = tsTRUE
HyperlinkTextAttr.HotStyleIsActive = True
HiddenTextAttr.Hidden = True
Align = alClient
TabOrder = 1
end
end -
I'm not printing the documents in a single file,
I need to send one, and then send other, using "WPRichtext.Print",
there's a bug in Print method that not update paper definitions,
if I call PrintDialog instead Print, it works, but I can't show a dialog before print,
In next links I show the tests results:http://gdicomvix.zapto.org/download/wptools/super01.tif (first print)
http://gdicomvix.zapto.org/download/wptools/super02.tif (second print)
http://gdicomvix.zapto.org/download/wptoo…r02_correct.tif (correct size print, using printdialog)
regards
-
Hi,
I think that I found other bug,
I'm using supermerge to generate a report and do a simple print (like the demo in wptools source)WPSuperMerge.Execute;
WPReportDest.Print;The problem is when I print files with diferent paper sizes, follow the link with examples:
http://gdicomvix.zapto.org/download/wptools/super01.rtf
http://gdicomvix.zapto.org/download/wptools/super02.rtfI generate a report and print a document with "super01" (bigger paper) and after do the same with "super02", in the last, the paper assume the size of first.
If I print "super02" first, then works.
If I do a preview before print (WPPreviewDlg1.Execute), It show me with the correct size in the screen, but when a I send to printer, the paper goes wrong.
If I call "WPReportDest.PrintDialog" instead "Print" it works, but I need to comment a line in source code (//Paint;) cause this give me a error (Control with no parent...) when executed.
I'm using Delphi7 + Wptools7
Sorry by my english,
regards
-
-
copy and paste inside.
-
This happens only if compiled in Delphi 7, I did the same with 10.1 (Berlin) and worked
-
Hello,
do you undertand my problem ? sorry by my english
regards -
Hi,
I have a problem when do a copy and paste,
when paste the line shows a different background color
the files with example bellow:http://gdicomvix.zapto.org/download/argox/wptools.png
http://gdicomvix.zapto.org/download/argox/000000361.rtf
regards