0

In my java application I obtain a pdf from a B64 stream. The result is converted to a pdf without white spaces. Has anyone had this problem? I don't know if the problem is the decoding/encoding base64 (I use jasperreport and java.common.codec) or other feature of the application (I see results as an e-mail attachment).

Thanks. Michele

Gray
  • 115,027
  • 24
  • 293
  • 354
Michele Bortolato
  • 707
  • 2
  • 11
  • 27
  • 1
    I would think that if there was a problem in the base64 encoding/decoding that you would not get a valid PDF. As @joel mentioned, I'd check the initial PDF first. – Gray Jan 03 '12 at 13:54
  • Please check the following like http://stackoverflow.com/questions/13644419/itext-java-pdf-to-text-creation –  Feb 25 '13 at 18:45

1 Answers1

0

Where is the PDF being generated? Hard to say without having more information, but I'd guess that the PDF is probably being generated by a server somewhere ... I would troubleshoot the PDF generation process and make sure that it's creating the correct PDF file structure before even getting to the base 64 encoded stream.

Joel Martinez
  • 46,929
  • 26
  • 130
  • 185
  • I use jasper report .hjasper templates, i found that the version tha i used, 4-0-1 (quite old) generate b64 stream that badly treat whitespaces. I tried to upgrade the jasperreport.jar version with 4.1.1, now only SOME parts of it has whitespaces removed, i'm trying to see the meaning but now i thik that is a matter of bad template generation. – Michele Bortolato Jan 03 '12 at 14:16
  • I have noticed that pdf is bad viewed in browser pdf viewre like google or other but is good viewed on pdf reader in pc, this is an example http://dl.dropbox.com/u/33469381/test.pdf.zip, the upper part is whitout whitespaces but lower has it. – Michele Bortolato Jan 04 '12 at 08:21