Table border printing problem
Table border printing problem
Two days ago, you helped me to make one pixel border table, and it worked perfect.
But another problem rised.
When I use stylus printer to print these tables, the border is so so so bord, so thick, more than 3 pixel. But if I use laser printer, the tables are beautiful.
Maybe you think it printers' problem, but these printers work well with Word and Excel.
Can you check out this problem?
Thx~
But another problem rised.
When I use stylus printer to print these tables, the border is so so so bord, so thick, more than 3 pixel. But if I use laser printer, the tables are beautiful.
Maybe you think it printers' problem, but these printers work well with Word and Excel.
Can you check out this problem?
Thx~
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The pic above shows 3 tables:
1. Useing RichViewAction, I insert a table. Then go to "Table properties" and set "Cell spacing" to -1.
2. Created by program:
table.BorderStyle := rvtbColor;
table.BorderWidth := 0;
table.BorderVSpacing := 0;
table.BorderHSpacing := 0;
table.CellBorderStyle := rvtbColor;
table.CellBorderWidth := 1;
table.CellPadding := 3;
table.CellHSpacing := -1;
table.CellVSpacing := -1;
3. Excel table.
===================================
You can see the differences easily.
The Excel table is a true ONE pixel table. The RichViewAction one is a two pixels table. The program created one is worst...
It is not so much as a three pixels table. Some lines' width are more than 4 pixels, and some are thiner.
===================================
My printer is Epson LQ-1600KIIIH, a stylus printer. My OS is win2k pro.
1. Useing RichViewAction, I insert a table. Then go to "Table properties" and set "Cell spacing" to -1.
2. Created by program:
table.BorderStyle := rvtbColor;
table.BorderWidth := 0;
table.BorderVSpacing := 0;
table.BorderHSpacing := 0;
table.CellBorderStyle := rvtbColor;
table.CellBorderWidth := 1;
table.CellPadding := 3;
table.CellHSpacing := -1;
table.CellVSpacing := -1;
3. Excel table.
===================================
You can see the differences easily.
The Excel table is a true ONE pixel table. The RichViewAction one is a two pixels table. The program created one is worst...
It is not so much as a three pixels table. Some lines' width are more than 4 pixels, and some are thiner.
===================================
My printer is Epson LQ-1600KIIIH, a stylus printer. My OS is win2k pro.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
When the cell spacings are positive, 2 for example, the width of the lines are two pixels.
=======================
This is the last question I answer. Please solve my problem as soon as possible. I am very vexed for it. I want to print a large number of tables, and the numbers of each table's cells are alse very LARGE. It is very very guly, and wasted ribbons, and also easy to damage the printer.
Everything is ready except this problem. I don't like to use a report control at this phase of project. Exactly, none of a report control could fulfil my needs except TRichView.
So, please solve my problem as soon as you can.
=======================
This is the last question I answer. Please solve my problem as soon as possible. I am very vexed for it. I want to print a large number of tables, and the numbers of each table's cells are alse very LARGE. It is very very guly, and wasted ribbons, and also easy to damage the printer.
Everything is ready except this problem. I don't like to use a report control at this phase of project. Exactly, none of a report control could fulfil my needs except TRichView.
So, please solve my problem as soon as you can.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry, but how can I solve this problem without knowing why it happens? I am asking questions not because I am trying to delay the solution, but because I want to know why it goes wrong.
I asked the last question because I want to know if the problem happens because of the border overlapping (may be drawing line two times over the same place makes it wider on that printer).
And sorry, I do not understand your answer. Are the lines have the same width when CellHSpacing=CellVSpacing=-1, and when they are positive values?
I asked the last question because I want to know if the problem happens because of the border overlapping (may be drawing line two times over the same place makes it wider on that printer).
And sorry, I do not understand your answer. Are the lines have the same width when CellHSpacing=CellVSpacing=-1, and when they are positive values?
I don't know if you both have noticed, but maybe this is significant. In the Nov 14, 2005 1:13 pm post with the first big snapshot, in the middle picture marked as "2", the leftmost cell in roughly 9th row from the top appears to have a thinner left border than the other rows. This could indicate cell overlapping, perhaps due to floating point imprecision (on which side, I wouldn't know), but I find it interesting that only one row is different. If I am even seeing it clearly enough.
Michel
Michel
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
New discovery
=================================
=================================
I used "Microsoft Office Document Image Writer" as a virtual printer, to output the papers as a image file(.mdi). I snaped parts of the tables.
All tables and all cell were create by programming. It should be the same.
Why? Mystificatory.
You should go over your code and find out the problem.
=================================
=================================
I used "Microsoft Office Document Image Writer" as a virtual printer, to output the papers as a image file(.mdi). I snaped parts of the tables.
All tables and all cell were create by programming. It should be the same.
Why? Mystificatory.
You should go over your code and find out the problem.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I think the problem with the virtual printer in a rounding off error. And I stronly believe it's not in TRichView but in the printer, because TRichView draws all border lines using the same width (if the image is created in higher resolution and then saved in lower resolution, the virtual printer's rounding off error is understandable, the same artifacts you can see in TRVPrintPreview). I am afraid this problem is not solvable.
But back to the initial problem. I still need an answer to my last question.
But back to the initial problem. I still need an answer to my last question.
I've solved the problem with a middle course.
The codes above can do so on the whole, with litte bug.
I don't like to use this method, but i indeed have no more time.
Code: Select all
for r := 0 to rowCount - 1 do
for c := 0 to colCount - 1 do
table.SetCellVisibleBorders(c = 0, r = 0, true, true, r, c);
I don't like to use this method, but i indeed have no more time.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: