[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: SAS Forum: Creating multiple ODS PDF pages in a data step
From: Roger DeAngelis <rogerjdeangelis () GMAIL ! COM>
Date: 2017-06-30 18:06:24
Message-ID: 0384895186348297.WA.rogerjdeangelisgmail.com () listserv ! uga ! edu
[Download RAW message or body]
SAS Forum: Creating multiple ODS PDF pages in a data step
Actually appending pdf file
https://goo.gl/8zKMGM
https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-multiple-ODS-PDF-pages-in-a-data-step/m-p/372170
/* T0100210 SAS/Ghostscript: Combining pdf files file1+file2 into file12
SAS/Ghostscript: Combining pdf files file1+file2 into file12
Working code
=====================
%utl_pdfapn(file1=d:/pdf/part1.pdf,file2=d:/pdf/part2.pdf,file12=d:/pdf/part12.pdf);
Download ghostscript
http://www.ghostscript.com/download/
I copied the executable gswin64c.exe to my c:\pdf folder
copy C:\Program Files\gs\gs9.06\bin\gswin64c.exe to c:\pdf\gswin64c.exe.
Or put ' C:\Program Files\gs\gs9.06\bin' in your path
HAVE Two arbitrary pdfs
=======================
d:/pdf/part1.pdf
d:/pdf/part2.pdf
WANT append Part2.pdf to end of part1.pdf
=========================================
d:/pdf/part12.pdf
* _ _ __
_ __ ___ __ _| | _____ _ __ __| |/ _|___
> '_ ` _ \ / _` | |/ / _ \ | '_ \ / _` | |_/ __|
> > > > > > (_| | < __/ | |_) | (_| | _\__ \
> _| |_| |_|\__,_|_|\_\___| | .__/ \__,_|_| |___/
|_|
;
* create two PDFs;
ods pdf file="d:/pdf/part1.pdf";
proc print data=sashelp.class(obs=10);
run;quit;
ods pdf close;
ods pdf file="d:/pdf/part2.pdf";
proc print data=sashelp.class(firstobs=9);
run;quit;
ods pdf close;
* _ _ _
___ ___ | |_ _| |_(_) ___ _ __
/ __|/ _ \| | | | | __| |/ _ \| '_ \
\__ \ (_) | | |_| | |_| | (_) | | | |
> ___/\___/|_|\__,_|\__|_|\___/|_| |_|
;
* combining pdf files;
%macro utl_pdfcombine(file1=&hspo01,file2=d:/hsp/pdf/hsp_page1.pdf,file12=&hspo02)
/des label="Combine ppdfs";
filename cmd pipe "d:\pdf\gswin64c.exe -dNOPAUSE -sDEVICE=pdfwrite \
-sOUTPUTFILE=&file12 -dBATCH &file1 &file2"; data _null_;
infile cmd;
input;
putlog _infile_;
;run;quit;
filename cmd clear;
%mend utl_pdfcombine;
%utl_pdfcombine(file1=d:/pdf/part1.pdf,file2=d:/pdf/part2.pdf,file12=d:/pdf/part12.pdf);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic