Solved

TIFF + PDF using Java

Posted on 2004-08-12
14
8,835 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

734 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