I make PDFs on the fly, here's what I use, maybe it'll be helpful

<cfdocumentitem type="footer" >
        <cfoutput>
             Page: #cfdocument.currentpagenumber# / 
#cfdocument.totalpagecount#
        </cfoutput>
    </cfdocumentitem>

On Friday, February 28, 2014 3:01:13 PM UTC-6, Jonathan Voss wrote:
>
> Have you ever worked this out? I am working on the same issues now. Would 
> be nice to have an easy way of displaying page numbers.
>
> On Tuesday, August 21, 2012 4:16:22 AM UTC-4, Confused wrote:
>>
>> Not what I was hoping to hear, but thanks.
>>
>> I'll play with that, but it may be a few days.
>>
>> If it could all be solved with css3, I wouldn't mind a bit. Gotta learn 
>> it eventually... and CFDocumentSection has never been a real gem, anyway.
>>
>> But "Page X of Y" is hard to do without.
>>
>> Pls let me know of any tips you hear of, and I'll get back with the 
>> results of my tinkering.
>>
>> tx,
>> c
>>
>>
>>
>> On Tuesday, August 21, 2012 1:27:54 AM UTC-5, Peter J. Farrell wrote:
>>>
>>>  There is definitely some work to be done.  This works, but no access 
>>> to any cfdocument variables:
>>>
>>> <cfdocument format="pdf"
>>>     orientation="landscape"
>>>     src="http://#cgi.SERVER_NAME#"; <http://#cgi.SERVER_NAME%23>
>>>     
>>> filename="#ExpandPath("/spectrum-public/docs/DuroDesignShowrooms.pdf")#"
>>>     overwrite="true">
>>> <style>
>>> @page {
>>>  @bottom-center { content: element(footer); }
>>> }
>>>
>>> div.content {page-break-after: always;}
>>>
>>> ##footer { position: running(footer); font-size:2em; }
>>>
>>> </style>
>>>
>>> <div id="footer">
>>> Footer information
>>> </div>
>>> <div class="content">
>>>     #event.getArg("layout.showrooms_usa")#
>>> </div>
>>> </cfdocument>
>>>
>>> @Alan, is there a way we can parse the body for placeholders so we can 
>>> use flying saucer notation with CSS3 and still have cfdocument.* access or 
>>> something like it?
>>>
>>> Confused said the following on 08/21/2012 12:46 AM:
>>>  
>>> Maybe I'm doing it wrong....
>>>
>>> This code (not in a cfdocumentsection):
>>>
>>> <cfoutput>
>>> <p>
>>> <cfif cfdocument.currentpagenumber is 1>
>>>     page 1 of #cfdocument.totalpagecount#
>>> <cfelse>
>>>     page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
>>> </cfif>
>>> </p>
>>> </cfoutput>
>>>
>>> produces this output (it's near the top of the page and has other output 
>>> below it, so it is definately on page 1):
>>>
>>> page BD:CURRENTPAGENUMBER of BD:TOTALPAGECOUNT
>>>
>>> I think we have an issue with not being able to determine total pages 
>>> until all of them have been rendered in some way.  ??
>>>
>>> tx,
>>> c
>>>
>>>
>>>
>>>
>>> On Tuesday, August 21, 2012 12:26:33 AM UTC-5, Peter J. Farrell wrote: 
>>>>
>>>> You definitely have access to current page and total pages...have you 
>>>> tried?
>>>>
>>>> You might be able to do headers and footers using css3 which the Flying 
>>>> Saucer library uses.
>>>>
>>>> @alan, do you know why the cfdocumentitem doesn't allow styling?
>>>> On Aug 21, 2012 12:17 AM, "Confused" <[email protected]> wrote:
>>>>
>>>>> ouch.
>>>>> That's a significant issue for me. Got about 20 reports I'm gonna have 
>>>>> to redesign.
>>>>>
>>>>> In the past, we haven't been able to use cfdocument.currentpagenumber 
>>>>> & totalpagecount for comparisons. (and if I remember correctly, can't use 
>>>>> 'em outside of header/footer). If I could get access to those, I could 
>>>>> likely craft my own headers/footers.
>>>>>
>>>>> Alternately, could I drop in an iText library and fix anything? .. 
>>>>> (even if I have to pay for it)
>>>>> That probably breaks with the open source philosophy, but my customers 
>>>>> are less concerned with that than with good-looking quotes.
>>>>>
>>>>> ideas?
>>>>>
>>>>> tx,
>>>>> c
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Monday, August 20, 2012 10:40:23 PM UTC-5, Peter J. Farrell wrote: 
>>>>>>
>>>>>> At this moment, text is the only thing allowed in header / footer. 
>>>>>> Its really a limitation of the FlyingSaucer library that is used. I 
>>>>>> haven't 
>>>>>> found a work around yet.
>>>>>> On Aug 20, 2012 9:49 PM, "Confused" <[email protected]> wrote:
>>>>>>
>>>>>>> Moving a site onto OBD. W08 Server, 64-bit.
>>>>>>>
>>>>>>> Can't get cfdocumentitem type=header/footer to do much. (I'm making 
>>>>>>> .pdf's, btw)
>>>>>>>
>>>>>>> It prints the text, but that's about it. ... no images... no 
>>>>>>> spacing... no fonts, colors or other styling whatsoever.
>>>>>>> It seems to ignore table tags, divs, and paragraph tags... doesn't 
>>>>>>> want to display an image whether in image tags or styled as backgrounds 
>>>>>>> ... 
>>>>>>> tried using style tags and inline styles...
>>>>>>> Nothing seems to work.  I just get a single, left-aligned, unstyled 
>>>>>>> line of whatever text I had in the tables, paragraph tags, etc.
>>>>>>>
>>>>>>> Any voices of experience on this?
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Much Tx,
>>>>>>> c
>>>>>>>
>>>>>>> -- 
>>>>>>> online documentation: http://openbd.org/manual/
>>>>>>> http://groups.google.com/group/openbd?hl=en
>>>>>>>
>>>>>>  -- 
>>>>> online documentation: http://openbd.org/manual/
>>>>> http://groups.google.com/group/openbd?hl=en
>>>>>
>>>>  -- 
>>> online documentation: http://openbd.org/manual/
>>> http://groups.google.com/group/openbd?hl=en
>>>
>>>
>>>
>>> -- 
>>> Peter J. Farrell
>>> OpenBD Steering Committee / Mach-II Lead 
>>> Developerhttp://blog.maestropublishing.com
>>> Identi.ca / Twitter: @maestrofjp
>>>
>>> Please do not send me Microsoft Office/Apple iWork documents. Send 
>>> OpenDocument instead! http://fsf.org/campaigns/opendocument/
>>>
>>>  

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to