Jump to content
We've recently updated our Privacy Statement, available here ×

pills83

Members
  • Posts

    4
  • Joined

  • Last visited

pills83's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi, The strange thing is that when I deployed on my production server (Unix or something like), the PDF was not showing a blank line, but a partially filled line, with not exactly the required font but a very close one... So I'm tired of this yet (I spent lot of time on it), I will create a WebStart application for my webapp, using swing, so I can at least a bit manage the user config. This app will only be used by a very few people, so I need not to make it very accessible. Anyway, thank you for your time. @ge0ffrey: Go http://www.google.com Peace
  2. Hello, I'm using jasper 2.0.5. I have a problem to embed a font in the pdf (it seems to not be embed, even when I put isPdfEmbedded to true or anything else). I have that in my report: Code:<textElement textAlignment="Right"> <font fontName="OCR-B" pdfFontName="OCR_BB.TTF" size="12" isPdfEmbedded ="true"/> </textElement> On the java side, I've that: Code:[code] final JasperReport report; final JasperPrint print; try { report = (JasperReport) JRLoader.loadObject(getClass().getResourceAsStream("/jasperreports/BVRB/BVRB.jasper"«»)); print = JasperFillManager.fillReport(report, map, new JREmptyDataSource()); } catch (JRException e) { throw new RuntimeException(e); } Map<FontKey, PdfFont> fontMap = new HashMap<FontKey, PdfFont>(); FontKey key = new FontKey("OCR-B", false, false); PdfFont font = new PdfFont("OCR_BB.TTF", "UTF-8", true, false, false); fontMap.put(key, font); JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.FONT_MAP, fontMap); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos); try { exporter.exportReport(); } catch (Exception e) { throw new RuntimeException(e); } I have this line from iText, too (but it seems to have no effect): Code:[code]FontFactory.register("OCR_BB.TTF", "OCR-B"«»); The font file is made available in my classpath (on the top of the hierarchy). Now what I can see: - if the font is installed under C:windowsfonts, everything works fine (I can see the good font on the pdf, and print it) - if the font is not installed on my computer, it simply display nothing at all So I guess the font is not correctly embed in the PDF, but I can't figure out why... Could anybody help me to fix this problem? Thank you very *very* much!! SP
×
×
  • Create New...