Extracting images from pdf files, was Re: [BL] Re: Interrupts and isapnp

sindi keesan keesan at sdf.lonestar.org
Fri Jun 10 15:04:22 EDT 2005


I tried to print to the dot-matrix printer with ghostscript (device epson) 
in both linux and DOS, gs 8.50 and 5.10.  It prints (both pdf and ps 
versions) at four times proper size (90 instead of 36 dpi) even specifying 
-r360x360.


Another older pdf file printed properly so I figured they had done 
something odd to the pdf format.  The site insists that you need Adobe 5 
to read its files.

I converted the file to two .pbm files (pbmimages) and converted one to a 
.gif (with pictview).


In DOS, I used printgf for DOS to print with the switch for 1:1 pixel (one 
printed dot per dot in the image file).  It printed four times the usual 
size.  So there is something about the image format used when scanning 
that is confusing 'epson' printers.  (I have not yet tried with stcolor 
escp/2 Epson inkjet printer, which does not have fan-fold paper).


I then set the switch to print 8x11" and adjusted the paper over to the 
left and down to the bottom to avoid margin errors.  It printed (in over 
15 minutes for one page at LQ) perfectly.  But since there was a 300 dpi 
to 360 dpi conversion involved, the lines are smudgier and the double 
lines are fat singles again.  This Panasonic is eminently unsuited for 
printing these pdf files.

In the process I discovered that printgf lets the user move the image 
around the page, with 0,0 being upper left corner as default, so I could 
just print to an HP with it from DOS after measuring each badly printed 
page to determine the needed adjustment (rather than doing a mechanical 
adjustment).

I will see if gs also lets me adjust the margins this way so I can print 
from linux without converting to .pbm and .gif first.  It would have to be 
done CLI since each page needs a different adjustment.  Or perhaps xv can 
be used to print (via gs), or netpbm's pbmtoepson allows for image 
placement on the page.  Extracting the pbm is quick and easy.



On Fri, 10 Jun 2005, sindi keesan wrote:

> I am now able to use pdfimages to extract images.  I must have been doing 
> something wrong.  It produces 300 dpi pbm files which I hope to be able to 
> edit, but it would still be simpler to just adjust a dot-matrix printer to 
> get the page printed properly, rather than cropping and padding top and 
> bottom and left and right of each page separately, which would probably take 
> more time than scanning and printing a copy from the library.
>
> pdftopnm produces ppm files from the same pdf files, much more slowly, and at 
> 150 dpi resolution.
> _______________________________________________
> BasLinux mailing list
> BasLinux at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/baslinux
>

keesan at sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



More information about the BasLinux mailing list