I have a strange issue ... I am using Word 2010 Interop, exporting a WordML document to PDF. There is a footer with top and bottom lines:
<w:pBdr>
  <w:top w:val="single" w:sz="8" wx:bdrwidth="20" w:space="0" w:color="auto"/>
  <w:bottom w:val="single" w:sz="8" wx:bdrwidth="20" w:space="0" w:color="auto"/>
</w:pBdr>
After opening document I use
            doc.ExportAsFixedFormat(
                outputFileName.ToString(),
                exportFormat,
                openAfterExport,
                optimizeFor,
                range,
                0,
                0,
                item,
                includeDocProps,
                keepIRM,
                createBookmarks,
                docStructureTags,
                bitmapMissingFonts,
                useISO19005_1
                );
to save as PDF. It saves fine, but the top and bottom lines do not show up in the footer. If I open the document manually with Word 2010 and use SaveAs/Publish, the lines are present. Any ideas?
I found the solution the the issue.
Turns out that this setting:
application.ScreenUpdating = False
was the cause. It triggers a bug in Word that causes borders not to render.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With