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

Coldfusion 8 -> PdfPTable.writeSelectedRows -> Exception : Use PdfStamper.getUnderContent() or PdfStamper.getOverContent()

New Here ,
Apr 07, 2009 Apr 07, 2009

Copy link to clipboard

Copied

Hi,

I use a PdfStamper to customize an existing pdf. And I add a PdfPTable with the writeSelecteRows method.

It worked fine in CFMX7 but when I upgraded to CF8.

I have an exception with this methode: Use PdfStamper.getUnderContent() or PdfStamper.getOverContent()

The code is :

//create the output file
fileIO = createObject("java","java.io.FileOutputStream").init(newFile);
//load the template PDF with the iText PDF reader
reader = createObject("java","com.lowagie.text.pdf.PdfReader").init(pdfFile);
//load the template into the iText PDF stamper and specify the output file
stamp = createObject("java","com.lowagie.text.pdf.PdfStamper").init(reader, fileIO);
over = createObject("java","com.lowagie.text.pdf.PdfContentByte");
over = stamp.getOverContent(javacast("int",1));

.

.

.

.

.

table.addCell(cell);

table.writeSelectedRows(0,-1,45,525,over);
stamp.close();

I don't know what seems the problem, I use the told method.

Thanks

TOPICS
Advanced techniques

Views

3.5K

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

correct answers 1 Correct answer

Valorous Hero , Apr 08, 2009 Apr 08, 2009

It is a problem with the wmf file, because it works with other the image types (gif and png).  You could use one of the other image types instead. Apparently it was corrected in a later version, but that will not help you unless you are using the JavaLoader.cfc.

http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg28534.html

Votes

Translate

Translate
Valorous Hero ,
Apr 07, 2009 Apr 07, 2009

Copy link to clipboard

Copied

What is the error message?

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
New Here ,
Apr 07, 2009 Apr 07, 2009

Copy link to clipboard

Copied

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

Use PdfStamper.getUnderContent() or PdfStamper.getOverContent()

The error occurred in C:\www\coldfusion\Testing\Ansell Food Certificates\index.cfm: line 141
139 :      table.addCell(cell);
140 :      
141 :      table.writeSelectedRows(0,-1,45,525,over);
142 :      stamp.close();     
143 :      </cfscript>

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 ,
Apr 07, 2009 Apr 07, 2009

Copy link to clipboard

Copied

Can you post a small runnable example that generates this error? I do not have any problem with 8,0,1,195765.

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
New Here ,
Apr 08, 2009 Apr 08, 2009

Copy link to clipboard

Copied

Here I attached an archive with all the needed file. (My CF version : 8,0,1,195765)

(Rename the files.zip.jpg with a .zip extension)

Thank you !

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 ,
Apr 08, 2009 Apr 08, 2009

Copy link to clipboard

Copied

It is a problem with the wmf file, because it works with other the image types (gif and png).  You could use one of the other image types instead. Apparently it was corrected in a later version, but that will not help you unless you are using the JavaLoader.cfc.

http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg28534.html

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
New Here ,
Apr 09, 2009 Apr 09, 2009

Copy link to clipboard

Copied

LATEST

Thank you !

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