convert docx to pdf, image of header became larger

asked 2021-04-20 12:02:54 +0200

boluo_99 gravatar image

updated 2021-04-22 10:56:25 +0200

I used soffice/libreoffice convert docx to pdf, the image's size of header became larger and it cover part of the text area. How could I convert docx to pdf with the same image's size

Supplementary notes(2021-04-21): I tried libreoffice versions 6.5-7.1 on macOS and Ubuntu, they all enlarge image of header in the special docx file, while I convert some other docx file, they could convert nomally. And attached is a sample docx document which header image will be enlarged when convert-to pdf.C:\fakepath\sample.docx

Supplementary notes(2021-04-22): Thanks for comments, after I convert docx to pdf, it seems normally in visual like the following left picture. But when I click the left-top image(gray rectangle area) in page-header, It appeared a larger rectangle area which was an image like the following right picture. That was what I mean. image description

Supplementary notes(2021-04-22): The original size of the imgae in header is normal. In the following screenshot, I click the left-top image in docx-file opened in LibreOffice 7.1.1.2 and click the same postion in pdf-file. image description

edit retag flag offensive close merge delete

Comments

Impossible to say anything without information about your LO version, a sample DOCX, and possibly your OS and LO source (TDF package/distro package manager/snap/...). If it's in a latest version, and is not specific to a distro, then maybe it's for a bug report.

Mike Kaganski gravatar imageMike Kaganski ( 2021-04-20 12:21:18 +0200 )edit

Save the open docx file with the extension .odt and close LibreOffice. Open the created file with the extension .odt, make corrections and export to pdf.

Astur gravatar imageAstur ( 2021-04-20 20:23:14 +0200 )edit

Works fine for me with 7.0.5 on Xubuntu 20.10:

C:\fakepath\PDF_picture.png

Hagar Delest gravatar imageHagar Delest ( 2021-04-21 07:25:08 +0200 )edit

Open ths docx-file with libresoffice and export as pdf, then open the pdf-file, you will find the image in header become laerger

boluo_99 gravatar imageboluo_99 ( 2021-04-21 07:29:45 +0200 )edit

Don't you see in the screenshot above that the bottom window is Writer and the top window (behind Writer) is the PDF reader (Foxit Redaer in this case)? I thought it would be obvious.

Hagar Delest gravatar imageHagar Delest ( 2021-04-21 07:38:42 +0200 )edit

Supplementary notes(2021-04-21): I tried libreoffice versions 6.5-7.1

I'm afraid there's some mistake: there was no version 6.5 released (unless you are talking about very early pre-alpha internal builds of development branch prior to deciding that the next one will be 7.0).

There was tdf#134736, fixed in the next 7.1.3, which seemed to be related.

Mike Kaganski gravatar imageMike Kaganski ( 2021-04-21 08:00:06 +0200 )edit

I checked with PDF/A-1b and 2b, with and without the reduce image feature and it still exports correctly.

Hagar Delest gravatar imageHagar Delest ( 2021-04-21 08:06:26 +0200 )edit

@Hagar Delest Same here, but obviously OP has some problem - interesting what are their settings?

Mike Kaganski gravatar imageMike Kaganski ( 2021-04-21 08:12:36 +0200 )edit

@Hagar Delest@Mike Kaganski Thanks for your opinions, i supply some new description. Try to click the image in header and have a look, maybe it was a bug in libreoffice.

boluo_99 gravatar imageboluo_99 ( 2021-04-22 10:22:28 +0200 )edit

I see what you describe now; and I think it's just how the cropped image gets exported to PDF (your image there is cropped, and likely its original size would be like what is selected when you click on the image there...?)

I suppose that PDF export could actually crop images (only keeping the visible part) if the crop is rectangular, but that would be an enhancement request.

Mike Kaganski gravatar imageMike Kaganski ( 2021-04-22 10:40:06 +0200 )edit