Skip to main content
Inspiring
October 19, 2006
Question

CFDocument- Output is cutting lines

  • October 19, 2006
  • 2 replies
  • 2062 views
The PDF document being produced is perfect on all 3 pages except for the first line of every pages (other than P1) is being cut "horizontally"... the line is there but I can only see the bottom/lower half of it.... as if the space reserve for the header or margin was overwriting the top portion of the text. I tried changing the size of the topmargin with no success; so I went back to using the default value and the problem is still there (no surprise).

I am using Adobe PDF Pro V6 so, thinking it may have to do with the Adobe version (not necessarely your average user) I went to a workstation that uses Adobe Reader V7 but same result!!!???

Any help would be much appreciated.
Thanks,
Claude Text Reader
This topic has been closed for replies.

2 replies

Inspiring
November 10, 2006
If I understand correctly, your rows are breaking across pages. I had a similar problem and it was resolved by using the following format:

<cfdocument format="pdf" fontembed="yes">
<!--- header --->
<cfdocumentitem type="header">
Student Report for <cfoutput>#School.SchoolName#</cfoutput></cfdocumentitem>

<!--- footer --->
<cfdocumentitem type="footer">

</cfdocumentitem>

<cfoutput query="yourQuery" group="YourGroup">

<cfdocumentsection><h2 class="style2"><u>YourGroup #yourQuery.YourGroup#</u></h2>
<table>

<tr><td>INSERT YOUR TABLE DATA HERE</td></tr>

</table>
</cfdocumentsection>
<!--- puts a page break between grade levels --->

</cfoutput></cfdocument>
cld007Author
Inspiring
November 13, 2006
The memo field that gets printed may take more than one page and that's where the problem is. The way CFdocument handles the page break of the PDF file when it is on its own. I currently have no way of knowing how long the memo field will be and even if I were to break after every memo field, if the memo field takes more than one page, then that page break gets handled by CF and I have no control over it. I would have to put every line of the memo field into a distinct record in order to be able to count the lines that get printed and manually break the page before CF does... but that wouldn't make sense.

Thanks,
Claude
October 31, 2006
If the document is always the same length I would put a <cfdocumentitem type="pagebreak"/> before the line that is getting cut off. What is happening with those lines is they try to display half of the line on the page above and half of the line on the page below. The page break will force the line to the next page instead of trying to display half and half.
cld007Author
Inspiring
October 31, 2006
In a "normal" text environment it could work however the text comes from a database. The same text is also being used on web pages so I cannot hardcode page breaks into it as it get displayed in one length.

I am trying to setup a "printer friendly" option where visitors can select (checkbox) the topic(s) they want from a newsletter. Once they have chosen the ones they want they are taken to a page which generates a "PDF custom made version" of the newsletter. Because their choices are unpredictable and also because the text (different lenght) comes from a database, I cannot tell the program where to put a page break in a cfdocument.

Claude
October 31, 2006
I had a similar problem to that when I was generating photo rosters. The PDF always differed and in the 5th row of every page would be split at the page. I had to do a count so that after 4 photos wide it would start a new row in table and incremental count each row so after the 4th row of every page it would do a line break. It doesnt translate to text well but maybe you can get some inspiration out of that.