Mass Importing Images Into Text Document.

Status
Not open for further replies.

scottspfd82

New member
Dec 29, 2006
1,496
68
0
I've got over 10k images that I want to split up, put into text documents of some kind, and then convert them to .PDF.

I'm using open office right now, and the best solution I've found is to just insert image, over and over again.

I tried copying/pasting a large number of images at once, but they all just paste on top of one another.... I need them to paste one after the other, and auto populate as many pages as it takes to hold them.

Anyone know how to set something like this up? I'd like to be able to just point it to a directory of images, and automatically post them to the pages.

Thanks.
 


You can put them to a webpage using simple PHP, and placing them one after the another using CSS.

A very simple example script (it looks for pictures in the same dir the script is in):

Code:
<?php

  echo '<style type="text/css">
  div.pic { float:left; width:200px; height:200px; margin:8px; overflow:hidden };
  </style>';
  
  $dir = dirname(__FILE__);
  if ($dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
      if($file == '.' || $file == '..') continue;
        echo '<div class="pic"><img src="'.$file.'" /></div>';
      }
    closedir($dh);
  }
?>
You may need to alter the size of the div etc. Then, you can save the webpage as PDF if you need.
 
  • Like
Reactions: scottspfd82
SWEET! Yet another one of the million reasons I need to sit my ass down and learn php.

Thanks man, much appreciated, +++rep.
 
Err...
do you want to combine them with text or only the images?
Anyhow easy to do if you know any programming.

::emp::
 
I use a simple .cgi program that will create a webpage of all images in a directory ... I really like the way it outputs them in terms of the layout ... does not use CSS ...

It is called Auto-Image Lister V1.4 -- by David Powell
 
Status
Not open for further replies.