pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: convert pdf page to image problem
Date Sat, 28 Mar 2015 14:38:25 GMT
Could you please upload your PDF to a public place?

Tilman

Am 25.03.2015 um 09:56 schrieb vanja K.:
>
>
>
> I   use  pdfbox  1.8.8  to  convert  pdf  pages  to  image,  i see  
> such  problem  for  page  1   of  attached  file (all other  my  
> files  are  working  ok)
>
> /Mar 20, 2015 4:31:22 PM org.apache.pdfbox.util.PDFStreamEngine 
> processOperator//
> //INFO: unsupported/disabled operation: i//
> //
> /and  saved  images  are   blank  (actually only  black line  is  
> shown),  is  any  way  to  fix  this   problem  for attached  file?
>
>
>
> this  is  my   function  i  use (nothing  special)
>
>
>
> private void _pageDebug(PDDocument document, int page) throws 
> IOException, IllegalArgumentException, PrinterException {
>
>         PDPageable pdfInfo = new PDPageable(document);
>
>         // convert page to image
>         PDPage pdfPage = (PDPage) 
> document.getDocumentCatalog().getAllPages().get(page - 1);
>
>         BufferedImage imagePage = pdfPage.convertToImage();
>
>         File outputfile = new File("c:/data/originalimage" + page + 
> ".png");
>         ImageIO.write(imagePage, "png", outputfile);
>
>
> }
>
> private PDDocument loadDocument(String src) throws IOException {
>         PDDocument document = null;
>         try {
>
>             document = PDDocument.load(src);
>
>
>         } catch (IOException ex) {
>             RandomAccessFile scratchFile = new RandomAccessFile(new 
> File(src + "2"), "rw");
>             document = PDDocument.loadNonSeq(new File(src), scratchFile);
>         }
>         return document;
>     }
>
>
> PDDocument     document = loadDocument(src);
> this._pageDebug(document,  page);
>
> -- 
> Thank You,
> vanja K.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message