BIG Problem with generating multiple pdfs
Copy link to clipboard
Copied
Hi,
I have an application for which the final output is a pdf report about an applicant from a database of applicants.
If I print the form just once, all the stylesheet formatting is applied correctly.
If I try to loop through the database and generate multiple reports of multiple applicants, the styles and formatting get applied ONLY to the first report, and then the subsequent reports do not have any styles applied which of course makes them unacceptable.
I've tried loading the stylesheet before the loop and inside the loop, no difference.
The styles being lost are for divs and tables and cells. Fonts are handled separately by calling functions within the report which apply them on the fly.to text based on the section and type of output.
Is anyone familiar with this problem? Is there a workaround? I really really really need this to work.
Thanks,
RIchard
Copy link to clipboard
Copied
I do not know the cause, but if all else fails you could move the cfdocument code to a separate template. Then the styles seem to work as expected.
<!--- loop code --->
<cfloop from="1" to="5" index="x">
<!--- call separate script cfinclude, cfmodule, etcetera ... --->
<cfinclude template="test.cfm?x=#x#">
</cfloop>
<!--- test.cfm --->
<cfdocument format="pdf" filename="testpdf-#url.x#.pdf" overwrite="true">
<div style="background-color: #ff0000;">Test div</div>
</cfdocument>

Copy link to clipboard
Copied
Richard,
may I know how to generate multiple reports from excel in Adobe prepare form?
do you write any script to do the process?
I have around 500 students record, and I need to populate Database and marks, every time I need to select one row from excel and prepare form, and it's a big process.
similar to Mail merge (from image), is there any options in Adobe to generate multiple reports from excel?
regards
kowsi
Copy link to clipboard
Copied
@Deleted User ,
You can use ColdFusion to solve your problem in the following simple way:
- Write a ColdFusion component (CFC) containing the function, generateReport. The function has one string argument representing the absolute path to an Excel file.
- Within generateReport, use cfspreadsheet to read the Excel file whose path is the value of the argument. The result of cfspreadsheet can be a query, for example.
Loop through the query, and generate a PDF report for each row.

Copy link to clipboard
Copied
Thank you!
Let me try CF and get back for any doubts
Regards,
Kowsi
--
Sent from my iPhone :tanabata_tree:
Copy link to clipboard
Copied
Kowsi, when you ask this question, you keep referring to Adobe. Are you really referring to ColdFusion, or do you have some other Adobe product you're using? And if cf, what version?
And are you asking how to populate a spreadsheet from a database? Or do you want to do the reverse, populating a db from a spreadsheet?
Or are you really meaning what you say, about populating a FORM? If really a form, is that form served by or processed by CF?
It's just not clear from your note. It's also not clear given that you ask your question in the context of resurrecting a post from 12 years ago, where it's not clear if it's related to your specific need.
/Charlie (troubleshooter, carehart. org)

Copy link to clipboard
Copied
I am not aware of ColdFusion, let me try and get back.
My issue is that, I have a database of 500 students in excel, (TSV format),
and
I placed field columns with Prepare form (adobe) in Pdf ,
now I need to automatically generate individual pdf for 500 students (1 pdf
of 500 pages or 500 different pdfs) when I link that tsv file to pdf.
Regards,
Kowsi
--
Sent from my iPhone :tanabata_tree:
Copy link to clipboard
Copied
If you still have the original Tab-Separated File, then automatically generating 500 PDF documents from it will be even easier.

