Page 1 of 1
PrintPreview with images and text
Posted: Wed Mar 08, 2017 11:26 am
by jota
Hello
In some documents that are displayed with TRVPrintPreview, composed of images and texts, the images appear correctly but part of the text appears outside the left margin.
I have checked that if I put bullets to the text, it fits correctly.
Any orientation or idea of why it occurs?
Is it caused by the configuration of the TRichViewEdit? (other documents with images and text appear correctly).
Thanks in advances.
Re: PrintPreview with images and text
Posted: Wed Mar 08, 2017 5:47 pm
by Sergey Tkachenko
May be paragraphs have negative LeftIndent and/or FirstIndent?
Re: PrintPreview with images and text
Posted: Thu Mar 09, 2017 1:31 pm
by jota
Hello.
It´s not problem with images.
It happens with TRichViewEdit.bidimode property equal to rvbdUnspecified. Changed to rvbdLeftoRight works fine.
Thanks
Re: PrintPreview with images and text
Posted: Thu Mar 09, 2017 3:58 pm
by jota
jota wrote: ↑Thu Mar 09, 2017 1:31 pm
It happens with TRichViewEdit.bidimode property equal to rvbdUnspecified. Changed to rvbdLeftoRight works fine.
Ignore previous solution since it is erroneous.The problem persists
If I insert bullet to the previous text, it adjusts to the left margin correctly
Re: PrintPreview with images and text
Posted: Thu Mar 09, 2017 5:34 pm
by Sergey Tkachenko
I still think that the problem is in indents. When you apply a paragraph list (bullets/numbering) to the paragraph, you also apply the list level margin. It overrides paragraph's LeftMargin (or RightMargin, for right-to-left paragraphs).
You can save this document as RVF file and send to me, or attach to this topic.
Re: PrintPreview with images and text
Posted: Mon Mar 13, 2017 8:28 am
by jota
Hello
I also think you're right but I can not find a way to solve it.
I attach two files, one with bullets that has a correct indentation and other without bullets with erroneous indentation (left of the left margin)
Thanks in advance
Re: PrintPreview with images and text
Posted: Mon Mar 20, 2017 4:20 pm
by Sergey Tkachenko
Sorry, I see nothing wrong with your "bad" file.
All indents are zeros,
This is how it looks after loading in "Editor 2" demo:
- indent.png (6.25 KiB) Viewed 31666 times
LeftMarign = 5 pixels, I added a green line showing it.
Re: PrintPreview with images and text
Posted: Mon Mar 20, 2017 7:04 pm
by jota
Hello
I see text correctly in my tdbrichviewedit (and in Editor2 demo), but
in PrintPreview text appears before left margin
I attach two files: ppl (printpreview with rvaleft alignment in tdbrichviewedit) and ppj (printpreview with rvajustify alignment in tdbrichviewedit)
Thanks in advance
Re: PrintPreview with images and text
Posted: Tue Mar 21, 2017 7:58 am
by jota
Hello, I have found my error.
It is not in the tdbrichviewedit but in PrintPreview, specifically in onpageprepaint event, there is an align modification with settextalign that causes the problem.
I have corrected it by saving the alignment previously and restoring it later
Sorry and thanks.