<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to combine multiple PDF files after multiple file processing ? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107496#M9949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can absolutely make 1 PDF file from &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;multiple&lt;/STRONG&gt;&lt;/SPAN&gt; SAS &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;procedures&lt;/STRONG&gt;&lt;/SPAN&gt; like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS PDF file="all_3_procedures.pdf";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS PDF CLOSE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this was not the original question as I understood it. In the original question, the original poster said that 8 txt files had been converted to 8 separate PDF files and that the new requirement was to combine the 8 separate PDF files into 1 "new" PDF file. This is different than the "sandwich" code I showed above. So when you said &lt;STRONG&gt;"I thought I can do the basic PDF document processing works within SAS without using Adobe products."&lt;/STRONG&gt; The "basic" processing is what I showed above...a single ODS PDF "sandwich" that captures your procedure or multiple procedure output to create 1 PDF file. This is the basic processing. More advanced processing is to save your procedure output in an ODS DOCUMENT store and then rearrange and/or replay that output &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;from&lt;/STRONG&gt;&lt;/SPAN&gt; ODS DOCUMENT format &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;to&lt;/STRONG&gt;&lt;/SPAN&gt; PDF output using ODS DOCUMENT/PROC DOCUMENT. This is also possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have multiple, &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;already existing&lt;/STRONG&gt;&lt;/SPAN&gt; PDF files....whether created by SAS or not, let's call them &lt;STRONG&gt;myfile1.pdf, myfile2.pdf&lt;/STRONG&gt; and &lt;STRONG&gt;myfile3.pdf&lt;/STRONG&gt;, then that is not "basic" ODS processing. As far as I know, Adobe has specific "start of file" and "end of file" information embedded in each PDF file when it is created. So, the only way to combine them into a single "new" PDF file is to use an Adobe product or a 3rd party software program that combines existing PDF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 18:33:11 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2014-01-02T18:33:11Z</dc:date>
    <item>
      <title>How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107492#M9945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;During multiple file processing (many thanks to nice &lt;A href="http://support.sas.com/resources/papers/proceedings10/009-2010.pdf"&gt;paper&lt;/A&gt; by Kevin McGowan and Matt Reich)&lt;/P&gt;&lt;P&gt;SAS reads 8 '.txt' files and produces 8 '.pdf' files to the same directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to write 8 '.pdf' files into one with correct pagination?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I name the '.pdf' files in a 'DDMMMYY-HH-MM-SS-mS' fashion according to the first basic approach&lt;/P&gt;&lt;P&gt;described in the paper with the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ODS PDF FILE = "&amp;amp;my_folder.\%sysfunc(translate(%sysfunc(datetime(),datetime20.3),--,.:))&amp;amp;MyExtt"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement. I tried to use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ODS PDF FILE = "&amp;amp;my_folder.\PDF_FILES_COMBINED&amp;amp;MyExtt"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the ERROR alike &lt;EM&gt;'.../PDF_FILES_COMBINED.pdf doesn't exist'&lt;/EM&gt; appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to solve the task ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Aug 2013 13:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107492#M9945</guid>
      <dc:creator>stan</dc:creator>
      <dc:date>2013-08-10T13:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107493#M9946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Every PDF file, whether made by SAS or made by some other method has specific "open" and "close" syntax. So the issue is that once SAS creates a separate PDF file, you cannot use SAS to combine the separate PDF files. You would need an Adobe product or some 3rd party PDF "combiner" app to do that, post processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So the challenge is this...you have this now, where I assume that your macro program is reading multiple TXT files and creating a unique ODS "sandwich" for each TXT file (like this, without the fancy names):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods pdf file='file1.pdf';&lt;/P&gt;&lt;P&gt;...code 1...;&lt;/P&gt;&lt;P&gt;ods pdf file close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods pdf file='file2.pdf';&lt;/P&gt;&lt;P&gt;...code 2...;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, instead, what you need to do is this -- go ahead and read all 8 TXT files, but change your ODS PDF invocation, so that all 8 proc prints or proc "whatevers" are inside just 1 ODS PDF sandwich:&lt;/P&gt;&lt;P&gt;ods pdf file='allfiles.pdf';&lt;/P&gt;&lt;P&gt;...code 1...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;...code 2...;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You cannot (easily) combine the separate PDF files afte SAS creates them. I have heard of folks making PostScript files, then reading the PostScript file with a program and then stripping out the "open/close" syntax and then making a PDF by writing all the "stripped" files back out, but it is a HUGE effort and far easier to alter your ODS "sandwich" or to get an Adobe product to do the combining after the fact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Aug 2013 17:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107493#M9946</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-08-10T17:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107494#M9947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of putting out PDF immediate you could use&amp;nbsp; &lt;A href="http://support.sas.com/documentation/cdl/en/odsug/64856/HTML/default/viewer.htm#p12gsvre1it3rsn1ce641m2q7svy.htm" title="http://support.sas.com/documentation/cdl/en/odsug/64856/HTML/default/viewer.htm#p12gsvre1it3rsn1ce641m2q7svy.htm"&gt;SAS(R) 9.4 Output Delivery System: User's Guide&lt;/A&gt; (Proc Document)&lt;BR /&gt;First saving it in a SAS environment and than creating the output what you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Aug 2013 18:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107494#M9947</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-08-10T18:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107495#M9948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"So the issue is that once SAS &lt;SPAN style="color: #4f4f4f;"&gt;&lt;A href="http://www.rasteredge.com/dotnet-imaging/addon-pdf-document-generator/"&gt;&lt;SPAN style="color: #4f4f4f;"&gt;creates a separate PDF file&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;, you cannot use SAS to combine the separate PDF files. You would need an Adobe product or some 3rd party PDF "combiner" app to do that, post &lt;SPAN style="color: #4f4f4f;"&gt;&lt;A href="http://www.rasteredge.com/how-to/winforms-net-imaging/pdf-reading/"&gt;&lt;SPAN style="color: #4f4f4f;"&gt;PDF processing&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;." Is this true? I thought I can do the basic PDF document processing works within SAS without using Aodobe products. A little disappointing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 06:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107495#M9948</guid>
      <dc:creator>cathyhill</dc:creator>
      <dc:date>2014-01-02T06:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107496#M9949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can absolutely make 1 PDF file from &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;multiple&lt;/STRONG&gt;&lt;/SPAN&gt; SAS &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;procedures&lt;/STRONG&gt;&lt;/SPAN&gt; like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS PDF file="all_3_procedures.pdf";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** procedure 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS PDF CLOSE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this was not the original question as I understood it. In the original question, the original poster said that 8 txt files had been converted to 8 separate PDF files and that the new requirement was to combine the 8 separate PDF files into 1 "new" PDF file. This is different than the "sandwich" code I showed above. So when you said &lt;STRONG&gt;"I thought I can do the basic PDF document processing works within SAS without using Adobe products."&lt;/STRONG&gt; The "basic" processing is what I showed above...a single ODS PDF "sandwich" that captures your procedure or multiple procedure output to create 1 PDF file. This is the basic processing. More advanced processing is to save your procedure output in an ODS DOCUMENT store and then rearrange and/or replay that output &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;from&lt;/STRONG&gt;&lt;/SPAN&gt; ODS DOCUMENT format &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;to&lt;/STRONG&gt;&lt;/SPAN&gt; PDF output using ODS DOCUMENT/PROC DOCUMENT. This is also possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have multiple, &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;already existing&lt;/STRONG&gt;&lt;/SPAN&gt; PDF files....whether created by SAS or not, let's call them &lt;STRONG&gt;myfile1.pdf, myfile2.pdf&lt;/STRONG&gt; and &lt;STRONG&gt;myfile3.pdf&lt;/STRONG&gt;, then that is not "basic" ODS processing. As far as I know, Adobe has specific "start of file" and "end of file" information embedded in each PDF file when it is created. So, the only way to combine them into a single "new" PDF file is to use an Adobe product or a 3rd party software program that combines existing PDF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 18:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107496#M9949</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-01-02T18:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107497#M9950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After or before multiple pdf pages processing, you can combine multiple pdf documents, like you said, 8 pdf files, or even more into one new pdf document by using a &lt;A href="http://www.rasteredge.com/how-to/vb-net-imaging/pdf-merge-split/"&gt;pdf merger&lt;/A&gt;, that is to say, you only need to implement a pdf document merging tool add-on, then you can integrate this pdf merger into your visual basic or c sharp application to merge multiple pdf files into one. And I am a programmer using visual basic a lot, so, I would like to share my codes on pdf merging to you, you are allowed to copy and make some modification of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Sub CombineDocumentsToStream(s As Stream, docList As List(Of BaseDocument))&lt;/P&gt;&lt;P&gt;PDFDocument.Combine(docList, s)&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tag: &lt;A href="http://www.rasteredge.com/how-to/vb-net-imaging/pdf-processing/"&gt;pdf processing&lt;/A&gt;, documents combining&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 03:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107497#M9950</guid>
      <dc:creator>BenthamLEE</dc:creator>
      <dc:date>2014-02-24T03:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple PDF files after multiple file processing ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107498#M9951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use Nitro PDF professional software for any operation with pdf (combining, deleting pages, spliting, editing....).&lt;/P&gt;&lt;P&gt;Any help related to Nitro, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Uma Shanker Saini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 05:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-combine-multiple-PDF-files-after-multiple-file-processing/m-p/107498#M9951</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2014-02-24T05:00:08Z</dc:date>
    </item>
  </channel>
</rss>

