PrintPreview with images and text

General TRichView support forum. Please post your questions here
Post Reply
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

PrintPreview with images and text

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: PrintPreview with images and text

Post by Sergey Tkachenko »

May be paragraphs have negative LeftIndent and/or FirstIndent?
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Re: PrintPreview with images and text

Post by jota »

Hello.

It´s not problem with images.

It happens with TRichViewEdit.bidimode property equal to rvbdUnspecified. Changed to rvbdLeftoRight works fine.

Thanks
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Re: PrintPreview with images and text

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: PrintPreview with images and text

Post 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.
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Re: PrintPreview with images and text

Post 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
Attachments
GoodIndent (with bullet).rvf
(1.7 KiB) Downloaded 1679 times
BadIndent (without bullet).rvf
(434 Bytes) Downloaded 1582 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: PrintPreview with images and text

Post 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
indent.png (6.25 KiB) Viewed 30545 times
LeftMarign = 5 pixels, I added a green line showing it.
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Re: PrintPreview with images and text

Post 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
Attachments
ppl.png
ppl.png (4.1 KiB) Viewed 30541 times
ppj.png
ppj.png (4.24 KiB) Viewed 30541 times
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Re: PrintPreview with images and text

Post 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.
Post Reply