I would like to cut some rectangular pieces from PDF documents and convert every piece to different images (.png) of the same size. İf a piece is small for the fixed size of image, then rest of image will be blank.
You should be able to do this in a single step using either the crop option for the
convertcommand in ImageMagick.
From the help of the
convert command (
-crop geometry cut out a rectangular region of the image
This option can be used to cut portions of a pdf file and save it as png in a single step. You can find more help and examples using this (link)
To summarize the linked page, here is the example they used:
convert rose: -crop 3x3@ +repage +adjoin rose_3x3@_%d.png
ImageMagick is cross-platform, so it should work regardless of your OS
You don't say which OS you are using, but regardless you should be able to achieve this using the standard built in software on the three main platforms.
You can open the PDF in the PDF viewer of your choice, take a screen shot of the image/part of the PDF that you want to turn into a .png, and paste into a simple bitmap tool.
On OS X
Open the PDF in Preview. Use CMD + Shift + 4 to take the screen shot of the area that you want, open the resulting Screenshot file on your desktop in Paintbrush, crop the image accordingly (to your required size) and save as a .png file.
Open the PDF in Document Viewer. Use
mtpaint -s to take the screenshot, and then in the resulting window, crop the image accordingly (to your required size) and save as a .png file
Open the PDF in Foxit. Hit the PrtScrn key, which will take a screenshot and place it in the clipboard, open MSPaint, paste in the screenshot from the clipboard, crop the image accordingly (to your required size) and save as a .png file
FastStone Capture has a Fixed Size Region function that sounds like it'd fit the bill. By default the toolbar button for that function is not there but you can add it via the settings for easy access if you'd prefer to use that over the keyboard shortcut method. When you take a screenshot using that function, options appear to allow you to change the size of the fixed region to suit your needs.
Latest version of the software is not free however. I believe v5.3, (a fairly old version now) appears to be the last freeware version but I don't know if it has the Fixed Size Region option available to it.
I paid for a copy years ago as I rate the software highly.