These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Print contents of a PDF Portfolio --- how

mes
Registered: Feb 4 2010
Posts: 8
Answered

I would like to export or print a list of the contents of a portfolio. It appears that I can print a file or files of the portfolio but I can't find a command anywhere to print a list of the contents.

My Product Information:
Acrobat Pro 9.0, Windows
JYeager
Registered: Aug 20 2008
Posts: 6
Did you ever find out how to print a list of portfolio contents? I've tried, too, and haven't found a way other than printing a screen snapshot of the list which is a very clumsy solution.

In one instance, I created a zip file of the portfolio documents and was then able to print the list from there.
mes
Registered: Feb 4 2010
Posts: 8
No I haven't. I suspect that it might be something I will have to address in a Java script, at that far away time when I have enought spare time. I continue to search the menus as I have learned that things can be buried there in completely unexpected places.
wpdesigner
Registered: Jun 7 2010
Posts: 1
Hi

do you have another solution for how to print a list of portfolio contents, because I need that list

Best Regards
mes
Registered: Feb 4 2010
Posts: 8
Sorry, I still need it as well.
rambovn
Registered: Sep 14 2008
Posts: 23
i may write that, stay tunned
mes
Registered: Feb 4 2010
Posts: 8
That would be marvelous! I am staying tuned!
StefanLoeners
Registered: Oct 22 2010
Posts: 2
Add me to that list, please.

StefanL
Belgium

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
Simple enough to do by enumerating the dataObjects array and building a PDF report.
Paste this code into the JavaScript Console, select it all and press CTRL-ENTER.


if (this.dataObjects != null) {var rep = new Report();rep.size = 1.7;rep.color = color.black;rep.writeText("Summary of files within the PDF portfolio: " + this.documentFileName + "\n");rep.writeText("Format : <level within folder tree>[filename]\n\n");var d = this.dataObjects;rep.indent(20);rep.color = color.blue;for (var i = 0; i < d.length; i++)rep.writeText(d[i].name);rep.color = color.black;rep.writeText("\n -- END OF LIST --");var docRep = rep.open("membership_of_" + this.documentFileName);} else app.alert("No attachments or not a portfolio");
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
The above code in a better display:
  1. if (this.dataObjects != null) {
  2. var rep = new Report();
  3. rep.size = 1.7;
  4. rep.color = color.black;
  5. rep.writeText("Summary of files within the PDF portfolio: " + this.documentFileName + "\n");
  6. rep.writeText("Format : <level within folder tree>[filename]\n\n");
  7. var d = this.dataObjects;
  8. rep.indent(20);
  9. rep.color = color.blue;
  10. for (var i = 0; i < d.length; i++)
  11. rep.writeText(d[i].name);
  12. rep.color = color.black;rep.
  13. writeText("\n -- END OF LIST --");
  14. var docRep = rep.open("membership_of_" + this.documentFileName);
  15. }
  16. else
  17. app.alert("No attachments or not a portfolio");

For cut and paste:

// start code
if (this.dataObjects != null) {
var rep = new Report();
rep.size = 1.7;
rep.color = color.black;
rep.writeText("Summary of files within the PDF portfolio: " + this.documentFileName + "\n");
rep.writeText("Format : [filename]\n\n");
var d = this.dataObjects;
rep.indent(20);
rep.color = color.blue;
for (var i = 0; i < d.length; i++)
rep.writeText(d[i].name);
rep.color = color.black;rep.
writeText("\n -- END OF LIST --");
var docRep = rep.open("membership_of_" + this.documentFileName);
}
else
app.alert("No attachments or not a portfolio");
// end code

Other properties that could be included are "description" and "size".

You have to run this script while in the cover sheet.

George Kaiser

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
gkaiseril wrote:
You have to run this script while in the cover sheet.
No you don't - you simply need to be looking at the navigator of a PDF portfolio; or a PDF Collection, or a PDF file with attachments (which are all the same thing as far as the dataObjects array is concerned). The only place it won't run will be when you're viewing an individual member document of a portfolio, as they aren't permitted to see each other for security reasons.


moren
Registered: May 10 2011
Posts: 3
Hello, i have the same problem. I was able to print the list of file names, however i would like to insert all the metadata fields, for example description. How do I add that into the Javascript?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can change the line that reads:

rep.writeText(d[i].name);


to

rep.writeText(d[i].name + " " + d[i].description + " " + d[i].size);

George Kaiser

moren
Registered: May 10 2011
Posts: 3
Thank you George,
I keep getting an error missing )in parenthetical 11: at line 12

this is what I wrote:
if (this.dataObjects != null) {
var rep = new Report();
rep.size = 1.7;
rep.color = color.black;
rep.writeText("Summary of files within the PDF portfolio: " + this.documentFileName + "\n");
rep.writeText("Format : [filename]\n\n");
var d = this.dataObjects;
rep.indent(20);
rep.color = color.blue;
for (var i = 0; i < d.length; i++)
rep.writeText(d[i].name+d[i].year enacted+d[i].year updated_revised+d[i].web-source+d[i].source +d[i].language+d[i].created);
rep.color = color.black;rep.
writeText("\n -- END OF LIST --");
var docRep = rep.open("membership_of_" + this.documentFileName);
}
else
app.alert("No attachments or not a portfolio");

moren
Registered: May 10 2011
Posts: 3
Hi George,
I managed by using Joel's utilities pack
can be downloaded here:
http://blogs.adobe.com/pdfdevjunkie/2008/10/joels_pdf_portfolio_utilities.php#comment-539
(including instructions on how to install)

The package includes 3 applications:
Combine All Open PDF Portfolios
Copy PDF Document Properties to Portfolio Fields
Export Portfolio Metadata to Console (what I used)

Instructions to export the Metadata using excel
http://blogs.adobe.com/acrolaw/2008/12/case_analysis_part_iii_exporting/

Because I have a Mac OS x these are the procedures I did to make it work.
1. open PDF portfolio
2. Menu bar select Window>remove split
*Once split is removed Joel’s portfolio becomes active
3. Edit>Joel’s portfolio utilities>Export portfolio Metadata to console
4. select all and copy data from console
5. open VMware Fusion (windows parallel)
6. open windows notepad and paste contents
7. save file as *.csv
8. copy *.csv and paste on main mac OS X desktop (or drag)
9. open with excel
I tried using the TextEdit and avoid parallel but couldn’t save the file on .csv format.

all best,