Solved

TIFF + PDF using Java

Posted on 2004-08-12
14
8,820 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
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.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Jpanels and Jframe 8 33
hibernate insert example 13 29
null output 3 25
CSV file parsing thru Java 13 31
This article provides the solution to a question (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28674207.html) posed here at Experts Exchange. The asker of the question has many JPG images in many folders, and all of t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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