Bug 146091 - Text is out of text box's rectangle when using --convert-to pdf in commandline
Summary: Text is out of text box's rectangle when using --convert-to pdf in commandline
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.1.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-07 12:26 UTC by oulanlan
Modified: 2023-06-29 03:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Upload by mistake (16.94 KB, application/zip)
2021-12-07 12:29 UTC, oulanlan
Details
output pdf (3.88 KB, application/pdf)
2021-12-07 12:42 UTC, oulanlan
Details
test case (16.93 KB, application/zip)
2021-12-07 12:45 UTC, oulanlan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oulanlan 2021-12-07 12:26:17 UTC
Description:
Text is out of text box's rectangle when using --convert-to pdf in commandline.
Anchor's position is relative from page.

Steps to Reproduce:
1. Download attachment 
2. Convert it to PDF from commandline: 'instdir/program/soffice --headless --convert-to pdf /home/adm/Downloads/text6.docx --outdir /home/adm/Downloads/'


Actual Results:
The text is out of text box's rectangle. See resulting PDF

Expected Results:
The text is in text box's rectangle.


Reproducible: Always


User Profile Reset: No



Additional Info:
see bug 140598:
https://bugs.documentfoundation.org/show_bug.cgi?id=140598
https://git.libreoffice.org/core/+/493a916a3113e877835c9bc7c93faef0d29f9a33%5E%21

sw/source/core/doc/textboxhelper.cxx :

if (aRect.TopLeft() != Point(0, 0))
{
    pFormat->SetFormatAttr(aNewHOri);
    pFormat->SetFormatAttr(aNewVOri);
}
else
    SAL_WARN("sw.core",
        "SwTextBoxHelper::syncProperty: Repositioning failed!");

Code "if (aRect.TopLeft() != Point(0, 0))" seems to have no effect on bug 140598. Bug 140598 is not reproduced when I delete the code. But it causes the text to be outside the range of the text box. Why do not SetFormatAttr if (aRect.TopLeft() != Point(0, 0)) ?
Comment 1 oulanlan 2021-12-07 12:29:27 UTC
Created attachment 176758 [details]
Upload by mistake
Comment 2 oulanlan 2021-12-07 12:42:50 UTC
Created attachment 176760 [details]
output pdf
Comment 3 oulanlan 2021-12-07 12:45:14 UTC
Created attachment 176761 [details]
test case
Comment 4 Buovjaga 2022-11-29 11:57:25 UTC
You are using a font named 等线 in the text box. Where can I download this font?

I don't see the problem when converting, but I lack the font.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 5 QA Administrators 2023-05-29 03:15:15 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2023-06-29 03:13:19 UTC
Dear oulanlan,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp