You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by shahnawaj akhtar <sh...@newgen.co.in> on 2010/03/11 08:06:27 UTC

Need open source code to convert pdf into tiff files

Hi,
Need open source code to convert pdf into tiff files.

Regards

Shahnawaj Akhtar




Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the original intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL)  accepts no responsibilities for loss or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL. 



Re: Need open source code to convert pdf into tiff files

Posted by Philipp Koch <pk...@day.com>.
hi,
you could do following:

by using pdfbox:
PDDocument doc = PDDocument.load(is);
List pages = doc.getDocumentCatalog().getAllPages();
BufferedImage image = page.convertToImage();

and than by using sanselan (commons.apache.org/sanselan):
ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
Map params = new HashMap();

// set optional parameters if you like
params.put(SanselanConstants.PARAM_KEY_COMPRESSION, new Integer(
				TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED));

byte bytes[] = Sanselan.writeImageToBytes(image, format, params);

i did not test this code. it's just a "brain dump"...

hth,
philipp



On Thu, Mar 11, 2010 at 2:10 PM, Mark Kerzner <ma...@gmail.com> wrote:
> ImageMagick <http://www.imagemagick.org/script/index.php> or
> GraphicsMagick<http://www.graphicsmagick.org/>
>
> On Thu, Mar 11, 2010 at 1:06 AM, shahnawaj akhtar <
> shahnawaj.akhtar@newgen.co.in> wrote:
>
>> Hi,
>> Need open source code to convert pdf into tiff files.
>>
>> Regards
>>
>> Shahnawaj Akhtar
>>
>>
>>
>>
>> Disclaimer :- This e-mail and any attachment may contain confidential,
>> proprietary or legally privileged information. If you are not the original
>> intended recipient and have erroneously received this message, you are
>> prohibited from using, copying, altering or disclosing the content of this
>> message. Please delete it immediately and notify the sender. Newgen Software
>> Technologies Ltd (NSTL)  accepts no responsibilities for loss or damage
>> arising from the use of the information transmitted by this email including
>> damages from virus and further acknowledges that no binding nature of the
>> message shall be implied or assumed unless the sender does so expressly with
>> due authority of NSTL.
>>
>>
>>
>

Re: Need open source code to convert pdf into tiff files

Posted by Mark Kerzner <ma...@gmail.com>.
ImageMagick <http://www.imagemagick.org/script/index.php> or
GraphicsMagick<http://www.graphicsmagick.org/>

On Thu, Mar 11, 2010 at 1:06 AM, shahnawaj akhtar <
shahnawaj.akhtar@newgen.co.in> wrote:

> Hi,
> Need open source code to convert pdf into tiff files.
>
> Regards
>
> Shahnawaj Akhtar
>
>
>
>
> Disclaimer :- This e-mail and any attachment may contain confidential,
> proprietary or legally privileged information. If you are not the original
> intended recipient and have erroneously received this message, you are
> prohibited from using, copying, altering or disclosing the content of this
> message. Please delete it immediately and notify the sender. Newgen Software
> Technologies Ltd (NSTL)  accepts no responsibilities for loss or damage
> arising from the use of the information transmitted by this email including
> damages from virus and further acknowledges that no binding nature of the
> message shall be implied or assumed unless the sender does so expressly with
> due authority of NSTL.
>
>
>

Re: Need open source code to convert pdf into tiff files

Posted by "Erik Scholtz, ArgonSoft GmbH" <es...@argonsoft.de>.
Akhtar,

look at the "PDFToImage"-Tool[1]. It can convert PDF to JPG. You can 
either add the TIFF-format and perhaps provide it to the project here, 
or you can do a commandline-conversion from th resulting JPG to TIFF 
with an additional third-party tool.

Cheers,
Erik

[1]
http://svn.apache.org/repos/asf/pdfbox/trunk/src/main/java/org/apache/pdfbox/PDFToImage.java
-- 

My blog: http://blog.elitecoderz.net


shahnawaj akhtar wrote:
> Hi,
> Need open source code to convert pdf into tiff files.
> 
> Regards
> 
> Shahnawaj Akhtar
> 
> 
> 
> 
> Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the original intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL)  accepts no responsibilities for loss or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL. 
> 
> 
>