1

I've had a good search and not seen anyone asking a similar question - I'm testing out the mail merge function to see if it will work for our next mailing. I'm able to export labels as a PDF from an advanced search without any issues. However, any tests I do trying to export a .pdf, .odt, or .docx mail merged document produces a corrupted file - PDF readers all say the document is "damaged" and .docx and .odt produces a file with an awful lot of nonsense in it!

Anyone faced anything similar and found a solution?

Edit

After a bit of googling and messing around, I managed to get it to export the text I wanted in a HTML format. .docx and .odt documents are corrupted, pdfs won't open. At the top of the HTML and .docx documents there is a message saying "Notice: No file uploaded in Unknown on line 0". If I work it out I'll post here, but I can't find any others with similar problems. I've tried on multiple browsers and machines.

I've also tried to export contact data as a .csv file, again without luck. The file is corrupted with just a huge quantity of unintelligible symbols.

Edit 2!

We are running version 5.5.1

  • 1
    Could you please edit your question to indicate your CiviCRM version? Thanks! – Jon G - Megaphone Tech Sep 28 '18 at 16:28
  • Done, thanks! We're on 5.5.1 and it was very recently installed. – Andrew Metheven Sep 28 '18 at 16:46
  • 1
    One more request - could you please include a snippet of the gibberish that appears on .odt/.docx exports? Most importantly, does the gibberish begin with {literal}? – Jon G - Megaphone Tech Sep 28 '18 at 20:52
  • Hi, sure - here's the first line. No reference to {literal} : "Notice: No file uploaded in Unknown on line 0 PKºRAM?,n¤[Content_Types].xmlµ??E?E?Jܲ@5?*Q>5'­_²'}?¦DAC?)". – Andrew Metheven Oct 1 '18 at 8:23
1

Based on the "Notice" in the comment you posted above, it sounds like the issue is one of headers already being sent.

When you generate a .pdf/.docx/.odt file, the web server sends the exact set of bits and bytes necessary to generate that file. However, it assumes that no other data is being sent. If, before the document is generated, additional data is sent, you'll get a corrupt document. It looks like that's what you're experiencing.

Check out the answer here: Error when printing PDF letter or mailing label from search results list. It gives links that explain how to suppress notices on your live site, which should resolve this issue.

  • Hi, Great - thanks! I'll try and give this a go. – Andrew Metheven Oct 1 '18 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.