JasperReports:导出为PDF / a 1a

时间:2015-12-17 18:15:36

标签: java jasper-reports pdf-generation

我正在尝试使用JasperReports将PDF文件导出为PDFA / a1,但它不起作用,我真的不知道为什么。

我希望嵌入所有字体,但出于某种原因,Helvetica不是。我该如何将字体添加到项目中?

如果你曾经成功地将文件导出为PDFA / a1,请告诉我如何解决这个问题,或者给我一个有效的样本,我会从那里找到我的问题。

这是我到目前为止的代码:

//Get the PixelFormatInfo for the bitmap's particular format
CLSID pixelFormat = bitmapSource.GetPixelFormat();
IWicComponentInfo componentInfo = WicFactory.CreateComponent(pixelFormat);
IWICPixelFormatInfo info = componentInfo as IWICPixelFormatInfo;

//Get the number of bytes per pixel (e.g. 32bpp -> 4 bytes)
UInt32 bitsPerPixel = info.GetBitsPerPixel();
Int32 bytesPerPixel = bitsPerPixel / 8;

//Calculate the format's stride
UInt32 width;
UInt32 height;
bitmapSource.GetSize(out width, out height);
Int32 stride = width * bytesPerPixel;

0 个答案:

没有答案