Cfdocument to create pdf

Hello, I have an issue that i though was just a Railo issue then i took
some simple code and decided to test on Lucee and found it doens’t work
their either. So here is the issue. the image doesn’t get embedded into
the pdf creation. The PDF is created but the image is missing.

In my original code there is lots of other things but the main issue is the
missing image. any other output gets written to the pdf just not the
image. and in this case the image is in the same directory as the file
creating it and where the pdf is being generated.

this is where mickey mouse lives

I am not sure why this doesn’t embedd the image. I thought at first it was
a Railo Server issue but this code is set on a Lucee site.

any insights would be greatly appreciate. I had someone from the Railo
group working with me, but this was one issue we didn’t get resolved. Is
there some sort of sepcial permission for grabbing an image that shoudl be
set in the lucee admin?

We are currently on Lucee 4.5.2.018 final, on Windowns 2008 R2

Thank you.

So, I tried your code with minor modifications on Lucee, changing the
pagetype to A4 to correspond to the 210mm width, fixed a type, you forgot
to close a quote, and positioning the image within a div, using a logo
image file that I embed in PDFs in production, located in the same
directory as the cfdocument template.

this is where mickey mouse lives

The image is embedded in the PDF, as expected. See attached test.pdf.

Removing the div that positions the logo, as below, still results in the
image being embedded in the pdf.

this is where mickey mouse lives

Reverting the code to your original, where pagetype=“letter” and you forgot
the closing quote on the style attribute of the wrapping div, causes the
image to be rendered somewhere off the canvas of the PDF. Note how in
test3.pdf, something is pushing the text down the page. Here’s the code
that produced the PDF with the image missing:

this is where mickey mouse lives

Closing the quote on the style declaration fixes the issue. The image
reappears:

this is where mickey mouse lives

Hope that helps.

Nando

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamediaOn Thu, Jan 28, 2016 at 2:36 AM, Barbara ONeal <@Barbara_ONeal> wrote:

Hello, I have an issue that i though was just a Railo issue then i took
some simple code and decided to test on Lucee and found it doens’t work
their either. So here is the issue. the image doesn’t get embedded into
the pdf creation. The PDF is created but the image is missing.

In my original code there is lots of other things but the main issue is
the missing image. any other output gets written to the pdf just not the
image. and in this case the image is in the same directory as the file
creating it and where the pdf is being generated.

this is where mickey mouse lives

I am not sure why this doesn’t embedd the image. I thought at first it
was a Railo Server issue but this code is set on a Lucee site.

any insights would be greatly appreciate. I had someone from the Railo
group working with me, but this was one issue we didn’t get resolved. Is
there some sort of sepcial permission for grabbing an image that shoudl be
set in the lucee admin?

We are currently on Lucee 4.5.2.018 final, on Windowns 2008 R2

Thank you.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/9ca84b85-e11e-4714-bd5d-3bd782f25dba%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9ca84b85-e11e-4714-bd5d-3bd782f25dba%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

test.pdf (23.1 KB)

test2.pdf (23.1 KB)

test3.pdf (19.2 KB)

test4.pdf (23.1 KB)

Thanks so much for sticking with me on this one. So here is what I have
discovered but not yet sure how to fix.

I created a file and folder in the same site as the initial site I am
having issues with. In there I created a placed an image in the same
directory along with a blank application.cfm file. going to the page in a
browser generates a pdf with the image in it. So far So good. Then I
decided to see if it would produce the pdf if i called the image from
another directory. That too was successful. Then i took the exact same
code and replaced my original code being called for the pdf creation with
this new test (in other words basically removed everything but this code
that had produced a pdf with the image properly placed.) This time however,
the pdf generated did not contain the image.

Very strange. Same site same server same file two different directories,
however, my test directory has a separate application file. I then removed
the application file from the test directory and again I no longer have an
image when running my test.

So my conclusion is there must be something stuck in the application that
is preventing the images from appearing.

Run expandPath() on the image path used in the PDF’s, from the same
directory, and see if the result, the full path, is correct.

If it’s not correct, I’d look over the Application.cfm/cfc file for a
mapping that may be hijacking the image path.

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamediaOn Thu, Jan 28, 2016 at 4:07 PM, Barbara ONeal <@Barbara_ONeal> wrote:

Thanks so much for sticking with me on this one. So here is what I have
discovered but not yet sure how to fix.

I created a file and folder in the same site as the initial site I am
having issues with. In there I created a placed an image in the same
directory along with a blank application.cfm file. going to the page in a
browser generates a pdf with the image in it. So far So good. Then I
decided to see if it would produce the pdf if i called the image from
another directory. That too was successful. Then i took the exact same
code and replaced my original code being called for the pdf creation with
this new test (in other words basically removed everything but this code
that had produced a pdf with the image properly placed.) This time however,
the pdf generated did not contain the image.

Very strange. Same site same server same file two different directories,
however, my test directory has a separate application file. I then removed
the application file from the test directory and again I no longer have an
image when running my test.

So my conclusion is there must be something stuck in the application that
is preventing the images from appearing.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/f5ff464d-443b-42e8-b037-6ccf6d449582%40googlegroups.com
https://groups.google.com/d/msgid/lucee/f5ff464d-443b-42e8-b037-6ccf6d449582%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.