Hi is there a way to append a plot as PDF to an existing PDF file? savePlot seems not to have this possibility. Christof
append to PDF file
6 messages · Kenneth Takagi, jim holtman, Christof Kluß +2 more
PDF files contain information at the end of them and so you cannot append without altering the file (universally true for PDF). Perhaps pdf() your plots and use external tools to convert the PDFs to .ps then re-merge. Might not be the best way, but an effective one.
Ken Hutchison
On Nov 26, 2554 BE, at 5:38 PM, Christof Klu? <ckluss at email.uni-kiel.de> wrote:
Hi is there a way to append a plot as PDF to an existing PDF file? savePlot seems not to have this possibility. Christof
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
There is the 'pdftk' (PDF tool kit) that you will find on the web that will do the job. I have used it to both combine and split out the pages in the PDF file.
On Sat, Nov 26, 2011 at 5:51 PM, Ken <vicvoncastle at gmail.com> wrote:
PDF files contain information at the end of them and so you cannot append without altering the file (universally true for PDF). Perhaps pdf() your plots and use external tools to convert the PDFs to .ps then re-merge. Might not be the best way, but an effective one. ? ? Ken Hutchison On Nov 26, 2554 BE, at 5:38 PM, Christof Klu? <ckluss at email.uni-kiel.de> wrote:
Hi is there a way to append a plot as PDF to an existing PDF file? savePlot seems not to have this possibility. Christof
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.
2 days later
Hi Jim, Hi Ken Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that will do the job. I have used it to both combine and split out the pages in the PDF file.
yes, thx. GUI tools like www.pdfsam.org do the job too. But is there a
possibility to append files directly in R. That is to invoke "pdftk"
inside R with a "shellandwait"?
perhaps something like
for (i in ...) {
...
savePlot(filename="temp.pdf", type="pdf")
exec pdftk temp.pdf final.pdf cat output final.pdf
}
greetings
Christof
I think you are looking for the system() command. Michael
On Tue, Nov 29, 2011 at 7:11 AM, Christof Klu? <ckluss at email.uni-kiel.de> wrote:
Hi Jim, Hi Ken Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that will do the job. ?I have used it to both combine and split out the pages in the PDF file.
yes, thx. GUI tools like www.pdfsam.org do the job too. But is there a
possibility to append files directly in R. That is to invoke "pdftk" inside
R with a "shellandwait"?
perhaps something like
for (i in ...) {
?...
?savePlot(filename="temp.pdf", type="pdf")
?exec pdftk temp.pdf final.pdf cat output final.pdf
}
greetings
Christof
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 29.11.2011 13:15, R. Michael Weylandt wrote:
I think you are looking for the system() command.
... and you certainly do not want to use savePlot but rather use the pdf() device directly. Uwe Ligges
Michael On Tue, Nov 29, 2011 at 7:11 AM, Christof Klu?<ckluss at email.uni-kiel.de> wrote:
Hi Jim, Hi Ken Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that will do the job. I have used it to both combine and split out the pages in the PDF file.
yes, thx. GUI tools like www.pdfsam.org do the job too. But is there a
possibility to append files directly in R. That is to invoke "pdftk" inside
R with a "shellandwait"?
perhaps something like
for (i in ...) {
...
savePlot(filename="temp.pdf", type="pdf")
exec pdftk temp.pdf final.pdf cat output final.pdf
}
greetings
Christof
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.