Loading ...
Sorry, an error occurred while loading the content.

side subject- image magic with pdf

Expand Messages
  • Bryan Rasmussen
    RE: [XSL-FO] Re: FOP as a Servlet - Images won t display! I first learned about image magic as a tool to work with pdfs from this list(although I can t
    Message 1 of 9 , Apr 2, 2002
    • 0 Attachment
      RE: [XSL-FO] Re: FOP as a Servlet - Images won't display!
       
      I first learned about image magic as a tool to work with pdfs from this list(although I can't remember who posted), I've got it now and am doing some work with it, unfortunately I can't seem to output images from pdf, and the documentation seems unclear to me on this part - since I can do the other things the documentation talks about, changing resolution of images, blurring etc. the documentation must be unclear if I can't get that one last part to work.
      If someone has worked with image magic with their pdfs can you give me some pointers, sample command lines.
    • Oleg Tkachenko
      RE: [XSL-FO] Re: FOP as a Servlet - Images won t display!Hello ! I ve tried ImageMagick (its Java port JMagick actually) some weeks ago and I was succesfull to
      Message 2 of 9 , Apr 2, 2002
      • 0 Attachment
        RE: [XSL-FO] Re: FOP as a Servlet - Images won't display!
        Hello !
         
        I've tried ImageMagick (its Java port JMagick actually) some weeks ago and I was succesfull to get pdf2tiff transformation in a servlet. What I remember is installing of GhostScript, adding GhostScript's bin directory to the PATH, adding ImagemAgick's directory to PATH and MAGICK_HOME and a great battle with compiling JMagick for Windows.

        ---
        Oleg Tkachenko,
        Multiconn International, Israel

        -----Original Message-----
        From: Bryan Rasmussen [mailto:bry@...]
        Sent: Tuesday, April 02, 2002 10:38 AM
        To: XSL-FO@yahoogroups.com
        Subject: [XSL-FO] side subject- image magic with pdf

         
        I first learned about image magic as a tool to work with pdfs from this list(although I can't remember who posted), I've got it now and am doing some work with it, unfortunately I can't seem to output images from pdf, and the documentation seems unclear to me on this part - since I can do the other things the documentation talks about, changing resolution of images, blurring etc. the documentation must be unclear if I can't get that one last part to work.
        If someone has worked with image magic with their pdfs can you give me some pointers, sample command lines.


        To unsubscribe from this group, send an email to:
        XSL-FO-unsubscribe@egroups.com



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      • Bryan Rasmussen
        RE: [XSL-FO] Re: FOP as a Servlet - Images won t display!Oleg wrote: I ve tried ImageMagick (its Java port JMagick actually) some weeks ago and I was
        Message 3 of 9 , Apr 3, 2002
        • 0 Attachment
          RE: [XSL-FO] Re: FOP as a Servlet - Images won't display!
          Oleg wrote: I've tried ImageMagick (its Java port JMagick actually) some weeks ago and I was succesfull to get pdf2tiff transformation in a servlet. What I  remember is installing of GhostScript, adding GhostScript's bin directory to the PATH, adding ImagemAgick's directory to PATH and MAGICK_HOME  and a great battle with compiling JMagick for Windows.
          [Bryan Rasmussen] Thanks; I think it's probably a GhostScript problem like you indicate; I'm doing my stuff from the commandline so hopefully I won't have to worry about JMagick. :)
        • alzoid69
          You need to specify a Base Directory because FOP needs it to display external resourses. You can do it the the fop configuration file
          Message 4 of 9 , Jan 8, 2005
          • 0 Attachment
            You need to specify a Base Directory because FOP needs it to display
            external resourses. You can do it the the fop configuration file
            {fop-dir}/conf/userconfig.xml. Or you can do it with Java code (my
            prefrence)

            Here is my code in the doGet():
            ...

            ServletContext servletContext = getServletConfig().getServletContext();

            String appPath = servletContext.getRealPath(""); //root of web app
            org.apache.fop.configuration.Configuration.put("baseDir",appPath);

            ...

            My FOP looks like this:

            <fo:external-graphic src="file:images/logo.jpg"/>

            Hope this helps.

            Allan


            --- In XSL-FO@yahoogroups.com, "carbonejim" <Jim.Carbone@N...> wrote:
            > I've searched every place I can think of, and tried everything too.
            > I'm trying to put a graphic into a PDF using FOP 0.20.3 as a
            > servlet. Graphics to appear in my documents when I run FOP from the
            > command line.
            >
            > Here is a list of some things that I've tried:
            >
            > First, I put the img in almost every directory in Apache Tomcat
            >
            > No image displays
            > -----------------
            > 1: Used this fo tag - <fo:external-graphic src="url(imgs/jpeg.jpg)"/>
            > 2: Used this fo tag - <fo:external-graphic src="imgs/jpeg.jpg"/>
            > 3: Used this fo tag - <fo:external-graphic src="jpeg.jpg"/>
            >
            > No document displays
            > --------------------
            > 4: Used this fo tag - <fo:external-graphic
            > src="http://localhost:8080/examples/imgs/jpeg.jpg"/>
            > 5: Used this fo tag - <fo:external-graphic
            > src="file:c:\imgs\jpeg.jpg"/>
            > 6: Used this fo tag - <fo:external-graphic src="/imgs/jpeg.jpg"/>
            > 7: Used this fo tag - <fo:external-graphic src="url(/imgs/jpeg.jpg)"/>
            > 8: Used this fo tag - <fo:external-graphic src="url
            > (http://localhost:8080/examples/imgs/jpeg.jpg)"/>
            >
            > When no image displays in the document I can see this error message:
            >
            > ERROR 10171 [fop ] (): Error while creating area : Error with
            > image URL: imgs\jpeg.jpg (The system cannot find the path specified)
            > and no base directory is specified
            >
            >
            > Help! And you will sleep well knowing that you saved a person from
            > jumping out a four story window! Thanks!
            >
            > Jim
          Your message has been successfully submitted and would be delivered to recipients shortly.