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

BIG Problem with generating multiple pdfs

Engaged ,
Aug 22, 2009 Aug 22, 2009

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

TOPICS
Advanced techniques

Views

773

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 ,
Aug 25, 2009 Aug 25, 2009

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>

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
Guest
Jul 20, 2021 Jul 20, 2021

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

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
Community Expert ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

@Deleted User ,

You can use ColdFusion to solve your problem in the following simple way:

  1. Write a ColdFusion component (CFC) containing the function, generateReport. The function has one string argument representing the absolute path to an Excel file.
  2. 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.

 

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
Guest
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Hi BKBK,
Thank you!
Let me try CF and get back for any doubts

Regards,
Kowsi
--
Sent from my iPhone :tanabata_tree:

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
Community Expert ,
Jul 25, 2021 Jul 25, 2021

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)

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
Guest
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Charlie,
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:

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
Community Expert ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

LATEST

If you still have the original Tab-Separated File, then automatically generating 500 PDF documents from it will be even easier.

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