I had another look at your "bad" file. It is really two files glued to each other. Please open your "bad" file with NOTEPAD++. You will find "%PDF" twice. Your code (which is not self-working) appended to an existing file. That would explain why the itext file has 66KB and the "bad" file has 159KB.

Tilman

Am 05.02.2018 um 16:17 schrieb Robert Nemet:
No this does not help.

Robert

//robert

On Sat, Feb 3, 2018 at 2:39 PM, Tilman Hausherr <thaush...@t-online.de>
wrote:

Hi,

Please make two additions below this code

             fs.setFile(attachment.getTitleWithExtension());
             fs.setEmbeddedFile(ef);

add this:

fs.setFileUnicode(attachment.getTitleWithExtension());
             fs.setEmbeddedFileUnicode(ef);

Please give feedback whether that helped. If it does, I'll update the
example. According to the PDF specification the two /UF entries are
optional but strongly recommended.

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to