officer
officer copied to clipboard
Issue with Footer in rdocx object
On opening the file saved using print command, I am getting the error message saying that there is a problem with its contents. On checking further, I have identified that it is an issue with footer2.xml file.
I am using an existing docx file and adding external docx file to it. Both docx file doesn't have any footer in it.
The error message as given below:
Location: Part: /word/footer2.xml, Line:0, Column:0
Is it possible to remove the footer before saving it? Or any other way to fix this issue?
Is it possible to recreate this with two empty or small documents and a short script? You should be able to drag all three of those into the comment window. It would be helpful in figuring out what's going on.
Sure, I will do it and share the files.
On Mon, 5 Apr, 2021, 7:57 pm John Harrold, @.***> wrote:
Is it possible to recreate this with two empty or small documents and a short script? You should be able to drag all three of those into the comment window. It would be helpful in figuring out what's going on.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davidgohel/officer/issues/359#issuecomment-813420769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBINO3JBJCCN2EMJ77SCX3THHCDRANCNFSM42M3Y6UA .
PFA the DOCX files (Cover_Page_SP.docx and report_body_2.docx) that I am merging to generate the output DOCX File (Sample_Report.docx).
Also, the code that I have used to merge the two DOCX files:
report_s1 <- read_docx(path = 'Cover_Page_SP.docx')
report_s1 <- body_add_break(report_s1)
report_s1 <- body_add_docx(report_s1,src = 'report_body_2.docx')
print(report_s1, target = 'Sample_Report.docx')
Hello,
Thank you both for reporting this. I can reproduce! I am not sure if it will be easy, as said, the issue is with the footer that need to be removed
my mistake, the issue does not occur if the image is deleted.
Closing the issue, I can't see any issue while running the reprex. and Opening a print dialog does not trigger any error message neither. So it's probably fixed by some other commits