XnConvert : multiple crop from 1 file

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
pedronac
Posts: 10
Joined: Mon Feb 29, 2016 12:49 pm

XnConvert : multiple crop from 1 file

Post by pedronac »

Hello,

I use Xnconvert.

I have a pdf file with multiple pages.
From each page I need to extract seceral images (same place at each page).
The out put is PNG with 256 colors.
Each extracted image need to respect a numbering order.

For exemple :
file 1 = page1-image1.png
file 2 = page1-image2.png
file 3 = page1-image3.png
file 4 = page2-image1.png
file 5 = page2-image2.png
file 6 = page2-image3.png

I can :
convert pdf with ghostscript
setup out put file to pnh
change colors do 256 gray
crop 1 image at once

I can not (need help please) :
Crop several images from one page and setup output file respecting numbering.

How can I do it ?
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnConvert : multiple crop from 1 file

Post by cday »

When you use a Crop action any further actions will be performed on the resulting cropped area, so the only possible way I can see to get the overall result you need would be to run XnConvert three times with the same input images but different crop settings, and different output settings.

If you are unable to obtain the output file numbering you require using the options available on the Output tab, you should be able to renumber the resulting files using one of the many freeware renumbering utilities.

Edit:

XnConvert has an option to save the settings used as a script that can be reloaded for later use, so provided the crop areas remain constant you could if necessary create three scripts with the settings required for each crop action.

It is also possible, I believe, to have multiple instances of XnConvert open at the same time each with a different script loaded, which might also help to simplify the process.
pedronac
Posts: 10
Joined: Mon Feb 29, 2016 12:49 pm

Re: XnConvert : multiple crop from 1 file

Post by pedronac »

Thanks cday for your post.

From XnConvert, I tried the script for xnview and .bat for nconvert

With XnView I have error message "format of the file could not be determined", "For display less common format, the following option is available: Option->General->[x] Display all image file types".
I did check this option, but the error still on...

With Nconvert I can make 1 out put file.
The problem is the pdf resolution is only 72 dpi and I need to change it to 200, but I did not find the command (-dpi do not work)
And NConvert only work on the first pdf page, I need to do it for all page. Again, I did not find the command (-multi do not work)

Someone could guide me ?

Do I need to post these questions at xnview and nconvert forum ?
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnConvert : multiple crop from 1 file

Post by cday »

pedronac wrote:With XnView I have error message "format of the file could not be determined", "For display less common format, the following option is available: Option->General->[x] Display all image file types".
I did check this option, but the error still on...
Does the file name have any unusual characters, as XnView Classic if you mean that software rather than XnConvert, doesn't support Unicode? If so you could try renaming the file, or possibly upload a sample file for examination. Also, some possibly slightly malformed PDF files that open in common PDF viewer software don't open in XnView software for some reason.
With Nconvert I can make 1 output file.
The problem is the pdf resolution is only 72 dpi and I need to change it to 200, but I did not find the command (-dpi do not work)
And NConvert only work on the first pdf page, I need to do it for all page. Again, I did not find the command (-multi do not work)
-dpi 200 in the correct place should work, but you need -xall not -multi I think to process the pages of a multi-page file, although I'd need to test whether it is actually required to be sure, I'm not sure that it is...

Edit: If the images in a multi-page file aren't processed directly, you might need to extract them using -xall and then perform the crops on those files.
With Nconvert I can make 1 output file.
If you can use NConvert you should be able to create a Windows batch file .bat that calls NConvert three times to perform the three crops you need on each input file, and you may also be able to output the resulting files with the file names you need directly with some luck and persistence...
Do I need to post these questions at xnview and nconvert forum ?
As far as possible please post each request under the correct software heading, depending on the detailed issue for which you are seeking help. :D
pedronac
Posts: 10
Joined: Mon Feb 29, 2016 12:49 pm

Re: XnConvert : multiple crop from 1 file

Post by pedronac »

Hi cday,

Yes, -dpi works and -xall also !
Thanks :)

now I need just to have the command line for auto renaming.
But I will do it into the good forum :)
Post Reply