Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Charset problems when altering a pdf-file

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Charset problems when altering a pdf-file

    Hi

    I need to alter two specific lines in some 3rd party meta data applied to a pdf-file. I'm working on mac with eclipse. I know that the problem is the handling of the charset. Can anyone help me with some lines that copies a pdf-file line by line, that keeps the pdf-file in the right encoding? Tried some examples found by google, but nothing seems to work for me. The closest thing I got was a pdf-file that acrobat was able to open but the file looked wrong. I need specific lines more that explanation.

    thanx


  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: Charset problems when altering a pdf-file

    Your Java platform will have its own default encoding. The PDF files will have theirs. Just about your only option is to make sure your Java platform's encoding is the same as the PDF files you're given. Set the file.encoding property of the JVM. From the command line it'd be java -Dfile.encoding=UTF-8 (for example). There'll be a knob somewhere in Eclipse that'll give you GUI access to the command line arguments.

Similar Threads

  1. Problems with my HW
    By hws in forum Object Oriented Programming
    Replies: 14
    Last Post: December 30th, 2011, 12:18 PM
  2. MP3 problems
    By relion65 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: July 15th, 2011, 12:09 PM
  3. Im having problems compiling a very simple .js file to .exe
    By idesyl in forum Member Introductions
    Replies: 3
    Last Post: March 10th, 2011, 05:16 AM
  4. 2 problems...
    By Day2Day in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 22nd, 2010, 02:51 PM
  5. Problems with File Reader (Strings and 2D Array Storage)
    By K0209 in forum File I/O & Other I/O Streams
    Replies: 44
    Last Post: January 12th, 2010, 10:48 AM