Ask a Question related to Macromedia ColdFusion, Design and Development.
-
chriskeeler2 #1
to cfloop or not to cfloop?
:confused;
I have a list of checkboxes from a form, and a submit button for "Batch Print"
The var is "SelectList" and comes out as comma dilimited. I need to loop over
each value, and insert it as another "page" in my CFX_PDF tag.
What I am trying to do: I have a list of PDF files and would like a batch
print functions. Checkbox for each PDF and a Batch Print submit bitton. CF
takes these record ID's of the PDFs and loops over them. Creating a new PDF
with each page being one of the selected PDFs. Basicall transforming all the
selected PDF's into one big PDF with multiple pages. I am able to read
existing PDF's and create pages using CFX_PDF, but not sure how to get the code
to loop over the selected values, read the filenames (DB column) for these ID's
and insert the filenames into the new PDF. I have an example of how to read a
PDF and count the number of pages in it, so I just need to modify it to read
separate one page pdf and insert them into the new one.
See code. Thanks for your help.
<cfcase value="batch">
<cfset SelectList = form.selectlist>
<!---Select list is something like: 17,21,34--->
<cfquery datasource="prereg">
UPDATE pdf_status
SET print_flag = 'Yes'
WHERE ID IN (0#SelectList#)
</cfquery>
<cfset status = "Printed">
<!---Need to count how many total are in SelectList--->
<cfset index=#SelectList#>
<cfloop query="request.PDFInfo">
<!---loop over SelectList values-->
<cf_pdf_page width="#width#" height="#height#">
<cf_pdf_read file="#pdf_filename#" page="#index#" />
<!---Read each value and insert as a new page--->
</cf_pdf_page>
<cfset index = index + 1>
</cfloop>
chriskeeler2 Guest
-
cfloop
The goal is to insert a record into table 'atd', which contains a document id and an associate id, for each document (38) and associate (150). So... -
cfloop error
I am getting an error that is resolving to the closing tag for the </cfloop>. Any Ideas? <cfoutput query="Recordset1" group="category"> <table... -
Cfloop..
I am trying to loop over a list: <cfquery name="updsyllabus" datasource="#arguments.syl.dsn#"> UPDATE #arguments.syl.tname# SET <cfloop... -
<cfloop> question
The code below generates a list of form fields for my form. I've been asked to see if it's possible to skip a line after every two form fields. Is... -
CFLOOP/CURRENTROW
I have a LOOP that runs over a query and I use CURRENTROW so that I can then use MOD on it so I can utilize repeating ARRAY data to change the color... -
GeorgeWS #2
Re: to cfloop or not to cfloop?
Are you using CF7? If so you could use the cfdocument tag to output to PDF. you
could have all of the pdfs on a page, each wrapped in a isDefined() or cfif
statment. and use the pagebreak in between each PDF link. then. when some radio
buttons are submitted it would print all of the selected pdfs. Sort of chaining
(batching) them together breaking after each document. Hope this helps.
GeorgeWS Guest
-
chriskeeler2 #3
Re: to cfloop or not to cfloop?
No. CFMX 6.1 with the CFX tag called CFX_PDF
chriskeeler2 Guest
-
chriskeeler2 #4
Re: to cfloop or not to cfloop?
See next post...the saga continues
chriskeeler2 Guest



Reply With Quote

