Solved

TIFF + PDF using Java

Posted on 2004-08-12
14
8,822 Views
Last Modified: 2013-12-02
Hi Experts,

I am looking for Java-API's OR any sample applications to combine TIFF format file + PDF file = results in PDF / TIFF.
(I am using for Java Stand-alone application).

1. TIFF + PDF --> PDF   OR
2. TIFF + PDF --> TIFF

you help and comments will be appreciated..

Thank you

R.K
0
Comment
Question by:rama_krishna580
  • 7
  • 5
  • 2
14 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 11782920
0
 
LVL 35

Expert Comment

by:girionis
ID: 11782933
0
 
LVL 35

Expert Comment

by:girionis
ID: 11782946
The above link is part of the Java Media API: http://java.sun.com/products/java-media/
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 23

Author Comment

by:rama_krishna580
ID: 11785446
Hi,

Thank you for your links and info,
but i am looking for sample Java-Application / JAR files to full fill my problem...anyway i will go through the links u provided.

R.K
0
 
LVL 1

Expert Comment

by:SlimHealer
ID: 11786927
Here's a quick example I cobbled together.

//  MMcDougall
//
//      Example: Use JAI to read in files a tiff and a jpeg file, combinet
//  them and write out a jpeg file  
//
//
//      For the example to work, you need to get a pair of files
//      (tiff and jpeg respectively), and name them appropriately
//
//            ../images/jello.tif
//            ../images/clown800.jpg
//
//

import java.awt.image.RenderedImage;
import java.io.File;
import java.io.FileOutputStream;
import javax.media.jai.JAI;

public class TestCase  {
      final static String currDir = System.getProperty( "user.dir" ) + File.separator + "Images" + File.separator;
      final static String inputFile1 = currDir + "jello.tif";
      final static String inputFile2 = currDir + "clown800.jpg";
      final static String outputFile = currDir + "mixed.jpg";
      
      public static void main(String[] args) {
            RenderedImage img1;
            RenderedImage img2;
            RenderedImage mixed;
            System.out.println(currDir);
            try {
                  System.out.println("Reading " + inputFile1);
                  img1 = JAI.create("fileload", inputFile1);
                  
                  System.out.println("Reading " + inputFile2);
                  img2 = JAI.create("fileload", inputFile2);
                  
                  System.out.println("Combine the imges together.");
                  RenderedImage dst = (RenderedImage)JAI.create("add", img1, img2);
                  
                  System.out.println("writing result to " + outputFile);
                  FileOutputStream stream = new FileOutputStream(outputFile);
                  JAI.create("encode", dst, stream, "JPEG", null);
                  JAI.create("filestore", dst, outputFile, "JPEG", null);
            }
            catch( Exception x) {
                  System.out.println("Unexpected exception " + x);
                  x.printStackTrace();
            }
      }
}
0
 
LVL 23

Author Comment

by:rama_krishna580
ID: 11790147
Hi Slim,

Thanks, for your example, but i want exactly..like..i say above..

1. TIFF + PDF --> PDF   OR
2. TIFF + PDF --> TIFF

i am waiting for more responses....

R.K
0
 
LVL 1

Expert Comment

by:SlimHealer
ID: 11795252
Dow!  Not enough sleep yesterday.  PDF != JPEG, that's for sure.  My example sure looks silly in the clear light of seven hours of sleep and 2 cups of coffee.  Sorry.
0
 
LVL 23

Author Comment

by:rama_krishna580
ID: 11798465
Hi,

If anyone can provide this also, that will be fine...

Convert PDF ---> TIFF or TIFF --> PDF and murging multiple files (TIFF / PDF) together..

R.K
0
 
LVL 23

Author Comment

by:rama_krishna580
ID: 11804462
Hi all,

Thanks for your suggestions, actually i have found the solution @ http://itextpdf.sourceforge.net/

So any way thanx for suggestions.

R.K
0
 
LVL 35

Expert Comment

by:girionis
ID: 11807398
That's almost the same link I posted, isn't it?
0
 
LVL 23

Author Comment

by:rama_krishna580
ID: 11808689
Hi girionis,

Ok, i will give u the points....

R.K
0
 
LVL 35

Expert Comment

by:girionis
ID: 11808707
You don't have to if you feel you haven't been helped. Just ask a question to the community support to PAQ the question and refund the points back to you.
0
 
LVL 35

Expert Comment

by:girionis
ID: 11808713
0
 
LVL 35

Expert Comment

by:girionis
ID: 11808717
BAh.. too slow. Thank you for accepting, but if you still feel there is not enough info here just ask a question to Community Support for PAQ & Refund :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running JavaFX on JDeveloper 12C 1 55
ejb entity bean example 2 17
ejb mdb examples 1 10
How to configure empty element in XML Document parser? 15 36
PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question