Hi Dominique
It's definitely possible in Lucee to output a PDF binary retrieved via
a http call. These two lines work for me with a simple test PDF:
<cfscript>
http method="get" url="
http://localhost/test.pdf";
content type="application/pdf" variable="#cfhttp.fileContent#";
</cfscript>
If I dump the fileContent variable, I get the same as you: a Native
Array (byte[]), but that works fine when passed to cfcontent.
Can you post more of your code? And/or attach the PDF you're working with?
Julian.
On 1 October 2015 at 21:14, Dominique Dupuis <
domini...@gmail.com> wrote:
> On CF10-11 I used this: <cfcontent type="application/pdf"
> variable="#cfhttp.FileContent#"> to display my shipping (canada post) label
> so I can print it.
>
> A dump of the respond from Canada post API (cfhttp.FileContent) looks like
> this on Lucee (but shorten quite a lot) (with the only difference being that
> byte[] is binary[] on cf10 dump) :
> Native Array (byte[])
> Raw[60,63,120,115,99,1(.........lots more
> numbers.........)15,97,103,101,115,62]
> Base64 EncodedPD94(..........................lots more
> whatever....................................)wIiBl]
>
>
> On Lucee, the browser is telling me that "This PDF doc might not be
> displayed correctly"... and it does not display at all. The browser offers
> to try opening it with different viewers but the result is the same when I
> do. They don't read it as being a pdf file. Either Lucee can't use pdf as
> type for the tag cfcontent, or maybe conversion of raw fails. The wed site:
>
http://docs.lucee.org/reference/tags/content.html does not specify any
> accepted type for cfcontet. So I'm left in the dark as to what is wrong.
>
> Another post in Railo seems to be related to a somewhat similar situation
> (
https://groups.google.com/forum/#!searchin/railo/binary$20pdf/railo/6KQlOJo-Pe8/Dao4pVDBtVMJ)
> , but I don't understand the solution.
>
>
> Dominique
>
> --
> See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your
> ticket NOW -
http://www.cfcamp.org/
> ---
> 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+un...@googlegroups.com.
> To post to this group, send email to
lu...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lucee/84fecb71-54c6-4581-abd9-4de8e3a79fd9%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.