2

I have the following table in an MS Word document - 3 rows, 4 columns, and some horizontal borders:

MS Word table

When I save this as PDF, I see some strange glitches with the borders:

MS Word Save As PDF

Table border glitches in PDF

Note that whether or not the glitches appear seems to depend on the application I use to view the PDF file, and also the zoom level. Adobe Acrobat Reader seems to be the worst offender, in other PDF viewers (Google Chrome, MS Edge, PDF XChange Editor) the glitches generally don't appear, and do only if I zoom in over 200%.

It seems that the border is rendered in PDF with multiple shape objects (on for each column, plus one for each column boundary) rather than a single shape object spanning the width of the entire row:

enter image description here

Is there any way to avoid this problem? Is there any way to get the PDF border rendered with a single shape object?

2
  • Try closing the Word file and then Word. Create the PDF with Adobe Acrobat Pro and see if it works. You can use a trial of Acrobat to test. It may be Word itself causing the issue when it creates a PDF.
    – anon
    Commented Oct 11, 2022 at 12:12
  • 1
    I couldn't tell you the cause, but in my experience these are often visual rendering glitches, i.e., they don't appear when printed.
    – Arctiic
    Commented Oct 12, 2022 at 9:23

3 Answers 3

0

May I know which version of Word you are using? In Microsoft 365 we create a word document and convert it to PDF. And when it opened in Acrobat Reader there is no such a problem. So we suggest you to do a test with another version of Word to see whether it can be fixed.

1
  • I'm using Word version 2207, part of Microsoft 365 Apps for enterprise.
    – Tom
    Commented Oct 12, 2022 at 14:02
0

If you want a general approach to converting MS Word documents to PDF using Python, you can use the docx2pdf library, which is a popular choice. First, install the library using pip:

pip install docx2pdf

Next, use the following Python code to convert a Word document to PDF:

from docx2pdf import convert
# Replace 'input.docx' with the path to your Word document
# The output PDF will be saved in the same directory with the same filename as the input, but with a .pdf extension

convert("input.docx")

-1

If the Word document contains mostly charts or other graphics, the whole page might show up as an image. When that happens, the built-in PDF program doesn't detect an element, and so the PDF version doesn't match the original file.

You can try an Adobe Acrobat alternative, in this case, SwifDoo PDF, it's online converter is completely free, and you will get a 15-day free trial with its desktop program.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .