• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfdocument to cfpdf bug?

Guest
May 20, 2009 May 20, 2009

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#' =

     ByteArray objects cannot be converted to strings.

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

TOPICS
Advanced techniques

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 20, 2009 May 20, 2009

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 20, 2009 May 20, 2009

Copy link to clipboard

Copied

I had a look at your link, and tried it on my server - which is CF8.  It crashes.

The tag does not allow the attribute(s) TEXT. The valid attribute(s) are ACTION,ATTACHMENT,COPYFROM,DESTINATION,FOREGROUND,IMAGE,
ISBASE64,NAME,OPACITY,OVERWRITE,PAGES,PASSWORD,POSITION,ROTATION,
SHOWONPRINT,SOURCE,TARGETPAGE,TITLE.

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 20, 2009 May 20, 2009

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 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

LATEST

Issue was server was 8.0.0, needed 8.0.1 patch to work for this function.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation