天道酬勤,学无止境

jbig2

pdf 中的 jbig2 数据不是有效的 jbig2 数据。 错误的魔法(jbig2 data in pdf is not valid jbig2 data. Wrong magic)

问题 我想从 pdf 文件中取出一些 jbig2 数据并使用 libjbig2dec (http://sourceforge.net/projects/jbig2dec) 加载它 出于某种原因,pdf 文件中的 jbig2 数据是这样开头的: 00000000 00 00 00 00 30 01 01 00 00 00 13 00 00 0a 5e 00 00000010 00 0f c3 00 00 2e 23 00 00 2e 23 00 00 00 00 00 00000020 00 01 26 01 01 ff ff ff ff 00 00 0a 5e 00 00 0f 00000030 c3 00 00 00 00 00 00 00 00 00 00 03 ff fd ff 02 00000040 fe fe fe ab f3 d0 fe 9e 92 d8 9f 63 ae 67 79 b8 00000050 81 ff 57 33 90 a4 ee c2 af c8 80 dc 0d 60 1e 86 但是一个有效的 jbig2 文件应该以这个魔法开始: 0x97, 0x4a, 0x42, 0x32, 0x0d, 0x0a, 0x1a, 0x0a 这里发生了什么? 回答1 pdf 格式按照 PDF, Version 1.7 (ISO 32000-1:2008)

2021-10-25 22:14:51    分类:技术分享    pdf   jbig2

jbig2 data in pdf is not valid jbig2 data. Wrong magic

I would like to take some jbig2 data out of a pdf file and load it using libjbig2dec (http://sourceforge.net/projects/jbig2dec) For some reason the jbig2 data in the pdf file starts with this: 00000000 00 00 00 00 30 01 01 00 00 00 13 00 00 0a 5e 00 00000010 00 0f c3 00 00 2e 23 00 00 2e 23 00 00 00 00 00 00000020 00 01 26 01 01 ff ff ff ff 00 00 0a 5e 00 00 0f 00000030 c3 00 00 00 00 00 00 00 00 00 00 03 ff fd ff 02 00000040 fe fe fe ab f3 d0 fe 9e 92 d8 9f 63 ae 67 79 b8 00000050 81 ff 57 33 90 a4 ee c2 af c8 80 dc 0d 60 1e 86 But a valid jbig2 file should start with this magic: 0x97, 0x4a

2021-10-25 02:14:34    分类:问答    pdf   jbig2

如何在 Chrome 浏览器中编写新的图像格式解码器(How to write a new image format decoder in Chrome Browser)

问题 浏览器对图像格式的支持很差。 实际上只支持 GIF、JPG、PNG 和 WebP。 我想要一个新的:JBIG2 从最终用户的角度来看,他只需下载并安装一个 chrome 扩展程序,他的浏览器就能够解码新的图像格式。 从 Web 开发人员的角度来看,新格式将是透明的,并且与标签 img、canvas 和 css 兼容。 为了显示 JBIG2 图像,他仍然使用: <img src=“path/to/myImage.jbig2”> 或者 var myImage = new Image(); myImage.addEventListener( 'load', function() { // insert in canvas, when image is loaded }); myImage.src = 'path/to/myImage.jbig2'; 或者 .my-class { background-image: url( “path/to/myImage.jbig2”); } 问题不在于解码器本身。 我预见到使用这个用 C 语言编写的 JBig2dec。 问题是如何实现一个新的图像解码器? 在 Chrome 中,当我们必须运行 C 代码时,最好的解决方案是使用 Native Client Extension。 更好的是,我可以在这个 NaCl 网页上阅读: 图形、音频等

2021-08-31 00:45:23    分类:技术分享    google-chrome   google-nativeclient   jbig2

由于其中的 JBIG2 图像,PDF 框生成空白图像(PDF Box generating blank images due to JBIG2 Images in it)

问题 先给大家介绍一下我的项目。 我有一个 pdf,我需要使用PDFBox API 将其转换为图像(一页图像),并使用PDFBox API 本身将所有这些图像写入新的 pdf。 基本上,将pdf转换为pdf,我们称之为PDF转码。 对于某些包含 JBIG2 图像的 pdf, convertToImage()方法的 PDFbox 实现无声无息地失败,没有任何异常或错误,最后,生成一个 PDF,但这一次,只有空白内容(白色)。 我在控制台上收到的消息是: Dec 06, 2013 5:15:42 PM org.apache.pdfbox.filter.JBIG2Filter decode SEVERE: Can't find an ImageIO plugin to decode the JBIG2 encoded datastream. Dec 06, 2013 5:15:42 PM org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap getRGBImage SEVERE: Something went wrong ... the pixelmap doesn't contain any data. Dec 06, 2013 5:15:42 PM org.apache.pdfbox.util.operator

2021-08-12 17:44:24    分类:技术分享    pdf-generation   pdfbox   jbig2

PDF Box generating blank images due to JBIG2 Images in it

Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using PDFBox API and write all those images onto a new pdf using PDFBox API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding. For certain pdfs, which contain JBIG2 images, PDFbox implementation of convertToImage() method is failing silently without any exceptions or errors and finally, producing a PDF, but this time, just with blank content(white). The message I am getting on the console is: Dec 06, 2013 5:15:42 PM org.apache.pdfbox

2021-07-11 10:44:58    分类:问答    pdf-generation   pdfbox   jbig2

How to write a new image format decoder in Chrome Browser

Browsers have poor support of image formats. Actually only GIF, JPG, PNG and WebP are supported. I would like to had a new one : JBIG2 From the end user point of view, he will only download and install a chrome extension and his browser will be able to decode the new image format. From the web developer point of view, new format will be transparent and compatible with tag img, canvas and css. To display JBIG2 images, he still uses : <img src=“path/to/myImage.jbig2”> or var myImage = new Image(); myImage.addEventListener( 'load', function() { // insert in canvas, when image is loaded })

2021-06-12 05:58:34    分类:问答    google-chrome   google-nativeclient   jbig2