Whats the best way to produce PDF output for Graphics

Greetings;
I posted something earlier which received no replys, so I figure I probably asked the wrong question.
I have recently migrated an application over from Delphi and I have to admit that I'm not as familiar with using Java and Graphics as I wish I were - I'm learning fast though..
Anyway I have an bufferedImage object in which I am drawing a few lines, pasting some text, and drawing circles and such. I currently am saving the file as a JPG using the following snippet of code:
    try
      FileOutputStream fos = new FileOutputStream(fileName);
      JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fos);
      encoder.encode(myBImage);
      fos.flush();
      fos.close();
    catch(Exception e)
      System.err.println(e.toString());
    }I've seen a few posts about PDF which all seem related to Text and printing as such - in fact the only post I've seen about converting a JPG to PDF seemed to circumvent the whole graphics object - which isn't a choice (I don't think it is) in my case.
Can anyone just provide me the best direction to look for this?
Thanks again;
Eirik..

Ouputing PDF manually can be large undertaking, i would recomend you refere to the many open source project of apache to use a pre-built method of output.
jakarta.apache.org
( there are two projects that accomplish what you are trying to do .. i just cant remember their names off the top of my head. )

Similar Messages

  • Best way to produce PDF output from Classic ASP

    I have Adobe Professional 9.2 and LiveCycle ES Designer 8.1. I need to change a Classic ASP web application to produce a PDF report. The way I see it I have three options:
    1) create native PDF output using open source libraries.
    2) create an FDF form with Adobe Pro as a template and use FDF libraries from Adobe to substitute text in the template
    3) create an XML form with LiveCycle as a template and do direct text substitution into the XML.
    I created a PDF with LiveCycle and prior to saving, unchecked the "save PDF files compressed" in tools/options. I don't want any text boxes, just labels, and in some of the labels I will put distinguishable text. When the web application uses the template it will find various text strings in the XML stream and substitute.
    What's the best way to do this? Is there a better way of doing substitution into the LiveCycle template? I would like to stay with LiveCycle. But from code samples I've seen, FDF substitution is very straightforward and possibly easier. I also thought LiveCycle is supposed to be the way to go instead of Adobe Pro. Thanks

    I cannot speak about theother methods but I can speak about the XFA method. In most cases people will bind the xml to the rawValue property of the field thereby filling the field with the value. However there are other bindable properties. Caption is one of them. first you have to turn on the Dynamic Properties. Click on th efield you want to control on on the Object palette click the icon as shown below:
    A new menu will open like this:
    Turn that option on and the Caption will turn a different color and will become a link. Click on the link and then you can map the caption to a node in your XML structure. This assumes that you have created a Data Connection to bind with.
    Paul

  • Whats the best way to get a description for a code

    Hi,
    What is the best way to find description for a code, when both of them resides in different table.I have to do this like 3 times for different codes.The code and description lies in differnt table.
    Can i use select statement.. if yes, what operator should i use?
    Thanks

    Hi,
    to do a lookup you may either use the Key Lookup Operator (it makes it easier to define default return values if the lookup fails) or a Joiner (to probably outer join your lookup table).
    If you have many lookups you can do them in one joiner instead of having a key lookup operator for every one of them to reduce the total number of operators in your mapping.
    Regards,
    Carsten.

  • Whats the best way to create USER variable in BI Apps?

    I have just installled BI Apps and am trying to integrate EBS R12 with OBIEE 11g
    We have USER variable already defined in the BI Apps rpd.
    In EBS Security context init block i need to define USER variable, but when i define it... it says *'USER' has already been defined in the variable "Authentication"."USER"*
    Whats the best way to create USER variable for EBS Security Context init block?
    1) Delete the existing USER variable and then define a new one ( in this case all the places where USER variable is getting used in the rpd would become <missing>)
    And i was told that it should not be done.
    Let me know how can it be done.
    Thanks
    Ashish

    Disable existing Init block and then double click on USER variable and hit on NEW... button to create new Init block
    Thanks
    Edited by: Srini VEERAVALLI on May 1, 2013 4:18 PM

  • What is the best way to post PDFs in iWeb?

    What is the best way to publish PDFs in iweb so that visitors can open the document, rint and/or save the document?

    jb ~ Welcome to the Support Communities. Rather than creating a new, almost identical thread to correct a typo, you can edit your post within 15 minutes:
    ...Each edit re-starts your 15 minute window for re-editing.

  • Using final cut studio what the best way of getting a mini disc in to FCP?

    I do some weddings and record some audio on to a mini disc recorder ( the small ones . On my avid liquid edit suite I just used to run it in live or ingest it on a 2 hour timer, and just record audio.
    What the best way to do it with final cut studio and final cut pro?

    Is there a reason you can't do the same on your mac system? What outputs does the audio recorder have?
    Jerry

  • HT3819 I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    Click here for options.
    (64410)

  • Whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    Check out > OS X Lion: How to use Migration Assistant to transfer files from another Mac

  • Wipe my hard drive clean except for the OS whats the best way?

    I need to wipe my hard drive clean except for the OS whats the best way?

    From Kappy (note: with this method, you will need to update to the present OS version using the appropriate Combo Update from Apple Downloads.)
    Boot from the OS X Installer Disc One that came with the computer. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities (Installer menu if using Panther or Jaguar) menu. After DU loads select the startup volume from the left side list then click on the Erase tab. Set the format type to Mac OS Extended (Journaled) then click on the Options button. Select the one pass Zero Data option and click on the OK button. Then click on the Erase button.
    Note: You can skip the Zero Data option if you are not concerned about removing sensitive personal data from the hard drive. If you choose to skip this part of the process then it is possible for others to recover data from the hard drive. The Zero Data procedure will prevent others from getting access to your personal information.
    This process will take 30 minutes to several hours depending upon the size of the hard drive. After formatting has completed quit DU and return to the installer. Now complete the OS X installation. At the completion of the installation do not restart the computer. Instead just shut it off. The next user will be presented with the Setup Assistant when they turn on the computer just as it would if new out of the box.
    https://discussions.apple.com/message/12364050?messageID=12364050#12364050

  • I want to connect a Mac mini to a Samsung 40", Whats the best way to do this?

    I want to connect a Mac mini to a Samsung 40" LED tv to use as the monitor, whats the best way of doing this?

    Understand that there is one HDMI port on your TV that is specifically designated for PC connectivity. The order that the TV or Mini are powered on may determine your results. For your specific TV model, check buyer reviews on Amazon or elsewhere that can include optimum TV/Computer settings adjustment for improved viewing results.

  • When I'm done with my fcp sequence, whats the best way to get it to dvd?

    When I'm done with my fcp sequence, whats the best way to get it to dvd?

    The advice to go to Compressor left out the part that you may want to convert your audio to AC3 becaus ethe MPEG2 bitrate is probably too high for DVD specs.
    This method is in the DVDSP manual and it's in the Compressor manual, both difficult to locate, but easily searchable.
    Here's what I'd do: Export the timeline form FCP in the native sequence settings, self-contained. Bring that self-contained movie into DVDSP and let DVDSP handle the transcode.
    The advice to go to iDVD is even easier.
    bogiesan

  • Whats the best way to get dvd onto 5800

    Peoples,
    I'm strugglin to get DVD onto my noka 5800. It's not obvious in the user manual and looking around the web i need to 'convert' it to the fim on.
    Please does anybody have an easy, fool proof way of doing this??????
    Message Edited by blueleaches on 21-Aug-2009 06:02 PM

    If its possible there should be some walkthrough's on google. 
    http://www.lmgtfy.com/?q=whats+the+best+way+to+get+dvd+onto+5800 

  • Whats the best way to get a big text file in a CLOB variable?

    Hi,
    I have a very premitive type of question.
    I have a big text file, say 30 MB, in a Unix directory (Solaris). I want to get the whole text of that file in a CLOB variable.
    I saw the procedure dbms_lob.loadfromfile/loadclobfromfile. In both these cases, according to the documentation, the target where is collect the data will be a BLOB and not a CLOB. So, I have to convert that blob into a clob.
    If I want to avoid all this conversion process, whats the best way to get a text from a file into a CLOB variable?
    Please suggest.
    Regards

    In addition, LoadFromFile is overloaded to handle both BLOB and CLOB:
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       BLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT
    <BR>
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       CLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT

  • Im having trouble with my ipad mini in regards with the icloud back up notification; if i press "ok" it doesnt dis appear, i couldn open my ipad/turn off because of this notification; whats the best way to get rid of this? please help

    im having trouble with my ipad mini in regards with the icloud back up notification; if i press "ok" it doesnt dis appear, i couldn open my ipad/turn off because of this notification; whats the best way to get rid of this? please help

    Have you tried a soft-reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Whats the best way to move files from a hard drive that wont boot?

    I made a bootable USB disk and it appears to work fine. I can still read and open files on the old disk (admin account only) from the new USB drive the old one doesn't boot. I don't have a backup but would like to move files to the USB and then reformat the old drive. 
    Whats the best way to capture the data?
    There are four user accounts on the old drive. Only one on the new drive so far. Do I need to set up four accounts on the new drive in order to copy data from each?

    Time Machine is for making backups and restoring ones it previously created. It doesn't restore data backed up or copied in other ways. In your case, it's better to use a cloning utility or manually drag the files than it is to use Time Machine.
    (124317)

Maybe you are looking for

  • Quicktime won't recognize entire DivX movie

    I've tried to play a DivX movie that's 2:46:49 long in Quicktime (7.1), but it only recognizes and plays 1:45:46 of it. I open the same movie file in VLC (0.8.5) and it recognizes and plays the entire movie. Movie format: 720 x 480, MPEG Layer 3, Ste

  • The symbol "/" in properties file is platform independent ?

    Hi! In my properties file I set many patha to my any resources(path to my icons, path to my user XML file and so on): # content of my properties file userSettingsPath=config/usersettings.xml baseNameImages=/resources/images/ # end As you see in path

  • Apps keep adding themselves back onto icloud backup

    Really annoying problem because ill get emails from icloud saying the backup is almost full , upon checking the backup page and what apps are backed up . I keep finding that my winzip app , adobe reader, and another app keep adding themselves back on

  • 9i on Redhat Linux 8: 9i won't shutdown automatically during OS shutdown

    Hello. I have 9.2.0.1.0 on Redhat Linux 8.0. After a lot of hassle, I finally got it starting automatically on OS startup. Now, the instance just won't shutdown during OS shutdown. The dbora script is fine; I could start/shutdown the instance using i

  • AudioServices not linking correctly

    For some reason whenever I try to run code that calls AudioServicesPlaySystemSound, or related methods, it fails to compile with this linker error: ld: symbol(s) not found collect2: ld returned 1 exit status Even Apple's Metronome sample code won't c