Copy link to clipboard
Copied
Hi all,
I've got a generated cfdocument that I can push to the user with a cfheader/cfcontent combo, but just before I do that I tried to pass the PDF variable (conflict_pdf) to the cfpdf tag, both with and without ## inside the 'source=' attribute for that tag. CFMX8 docs say I should be able to pass the pdf variable into cfpdf and then perform actions on it (I'm trying to use setinfo to set keywords etc).
I've seen cfpdf work on files read from disk but no examples outside the CFMX8 docs that work directly on in-memory PDF. Is this a known bug?
I get a variation on 'cannot convert' errors every time I try it.
Error I get when passing in source='#conflict_pdf#' =
Without ## =
Error casting an object of type [B cannot be cast to java.lang.String to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
[B cannot be cast to java.lang.String |
Copy link to clipboard
Copied
It sounds like a problem with the code, but it is hard to say without seeing it.
Also, take a look at this example. It might help you spot the problem.
http://www.coldfusionjedi.com/index.cfm/2008/4/4/ColdFusion-801--Easier-to-add-PDF-Watermarks
Copy link to clipboard
Copied
I had a look at your link, and tried it on my server - which is CF8. It crashes.
How broken IS this? All I did was take the example cfpdf tag and change the source name to my source document.
Server reports version 8,0,0,176276. This is plain not working for me.
UPDATE! - The article referes to 8.0.1 - the above is 8.0.0 - is this the issue? has cfpdf changed that much between versions? Where can I find a list of changes between these versions?
Copy link to clipboard
Copied
GrumpyJoe wrote:
UPDATE! - The article referes to 8.0.1 - the above is 8.0.0 - is this the issue? has cfpdf changed that much between versions? Where can I find a list of changes between these versions?
Yes. Check the release notes for updater 1. It will list the changes/fixes. Since you are not using 8.0.1, just use an image watermark instead of "text".
<cfpdf action="addWatermark" image="#pathToYourImage#" source="mypdf" foreground="true">
Otherwise, post your code. Without it we can only guess 😉
Copy link to clipboard
Copied
Issue was server was 8.0.0, needed 8.0.1 patch to work for this function.