{"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7","id":58534604,"html_url":"https://github.com/mbattyani/cl-pdf/pull/7","diff_url":"https://github.com/mbattyani/cl-pdf/pull/7.diff","patch_url":"https://github.com/mbattyani/cl-pdf/pull/7.patch","issue_url":"https://api.github.com/repos/mbattyani/cl-pdf/issues/7","number":7,"state":"open","locked":false,"title":"Allow copying and removing pages in templates","user":{"login":"pederkl","id":4670394,"avatar_url":"https://avatars.githubusercontent.com/u/4670394?v=3","gravatar_id":"","url":"https://api.github.com/users/pederkl","html_url":"https://github.com/pederkl","followers_url":"https://api.github.com/users/pederkl/followers","following_url":"https://api.github.com/users/pederkl/following{/other_user}","gists_url":"https://api.github.com/users/pederkl/gists{/gist_id}","starred_url":"https://api.github.com/users/pederkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pederkl/subscriptions","organizations_url":"https://api.github.com/users/pederkl/orgs","repos_url":"https://api.github.com/users/pederkl/repos","events_url":"https://api.github.com/users/pederkl/events{/privacy}","received_events_url":"https://api.github.com/users/pederkl/received_events","type":"User","site_admin":false},"body":"I want to use a two-page template (first- and follow-on-pages) to generate single, two- or multipage output.  This required changes to pdf-parser.lisp.\r\n\r\nTo achieve my goals I extended the signature of with-existing-page to take a new keyword parameter copy-p.  If nil, the existing template page is edited, as before.  If non-nil, a copy of the page is inserted at the end of the document.\r\n\r\nTo remove unneeded template pages, I added a new exported function remove-page.\r\n\r\nPerhaps someone else also finds this useful.  I make no claims that the code is optimal, I do not really understand the structure of PDFs or the cl-pdf representation of it.  But through trial and error, this seemed to do the job I wanted it to.","created_at":"2016-02-07T00:21:57Z","updated_at":"2016-02-07T00:21:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7/commits","review_comments_url":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7/comments","review_comment_url":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbattyani/cl-pdf/issues/7/comments","statuses_url":"https://api.github.com/repos/mbattyani/cl-pdf/statuses/bb43f2153c0ab53ff190d3e61872ae141ab982cf","head":{"label":"pederkl:master","ref":"master","sha":"bb43f2153c0ab53ff190d3e61872ae141ab982cf","user":{"login":"pederkl","id":4670394,"avatar_url":"https://avatars.githubusercontent.com/u/4670394?v=3","gravatar_id":"","url":"https://api.github.com/users/pederkl","html_url":"https://github.com/pederkl","followers_url":"https://api.github.com/users/pederkl/followers","following_url":"https://api.github.com/users/pederkl/following{/other_user}","gists_url":"https://api.github.com/users/pederkl/gists{/gist_id}","starred_url":"https://api.github.com/users/pederkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pederkl/subscriptions","organizations_url":"https://api.github.com/users/pederkl/orgs","repos_url":"https://api.github.com/users/pederkl/repos","events_url":"https://api.github.com/users/pederkl/events{/privacy}","received_events_url":"https://api.github.com/users/pederkl/received_events","type":"User","site_admin":false},"repo":{"id":36116936,"name":"cl-pdf","full_name":"pederkl/cl-pdf","owner":{"login":"pederkl","id":4670394,"avatar_url":"https://avatars.githubusercontent.com/u/4670394?v=3","gravatar_id":"","url":"https://api.github.com/users/pederkl","html_url":"https://github.com/pederkl","followers_url":"https://api.github.com/users/pederkl/followers","following_url":"https://api.github.com/users/pederkl/following{/other_user}","gists_url":"https://api.github.com/users/pederkl/gists{/gist_id}","starred_url":"https://api.github.com/users/pederkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pederkl/subscriptions","organizations_url":"https://api.github.com/users/pederkl/orgs","repos_url":"https://api.github.com/users/pederkl/repos","events_url":"https://api.github.com/users/pederkl/events{/privacy}","received_events_url":"https://api.github.com/users/pederkl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pederkl/cl-pdf","description":"CL-PDF is a cross-platform Common Lisp library for generating PDF files.","fork":true,"url":"https://api.github.com/repos/pederkl/cl-pdf","forks_url":"https://api.github.com/repos/pederkl/cl-pdf/forks","keys_url":"https://api.github.com/repos/pederkl/cl-pdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pederkl/cl-pdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pederkl/cl-pdf/teams","hooks_url":"https://api.github.com/repos/pederkl/cl-pdf/hooks","issue_events_url":"https://api.github.com/repos/pederkl/cl-pdf/issues/events{/number}","events_url":"https://api.github.com/repos/pederkl/cl-pdf/events","assignees_url":"https://api.github.com/repos/pederkl/cl-pdf/assignees{/user}","branches_url":"https://api.github.com/repos/pederkl/cl-pdf/branches{/branch}","tags_url":"https://api.github.com/repos/pederkl/cl-pdf/tags","blobs_url":"https://api.github.com/repos/pederkl/cl-pdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pederkl/cl-pdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pederkl/cl-pdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/pederkl/cl-pdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pederkl/cl-pdf/statuses/{sha}","languages_url":"https://api.github.com/repos/pederkl/cl-pdf/languages","stargazers_url":"https://api.github.com/repos/pederkl/cl-pdf/stargazers","contributors_url":"https://api.github.com/repos/pederkl/cl-pdf/contributors","subscribers_url":"https://api.github.com/repos/pederkl/cl-pdf/subscribers","subscription_url":"https://api.github.com/repos/pederkl/cl-pdf/subscription","commits_url":"https://api.github.com/repos/pederkl/cl-pdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/pederkl/cl-pdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/pederkl/cl-pdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/pederkl/cl-pdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/pederkl/cl-pdf/contents/{+path}","compare_url":"https://api.github.com/repos/pederkl/cl-pdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pederkl/cl-pdf/merges","archive_url":"https://api.github.com/repos/pederkl/cl-pdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pederkl/cl-pdf/downloads","issues_url":"https://api.github.com/repos/pederkl/cl-pdf/issues{/number}","pulls_url":"https://api.github.com/repos/pederkl/cl-pdf/pulls{/number}","milestones_url":"https://api.github.com/repos/pederkl/cl-pdf/milestones{/number}","notifications_url":"https://api.github.com/repos/pederkl/cl-pdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pederkl/cl-pdf/labels{/name}","releases_url":"https://api.github.com/repos/pederkl/cl-pdf/releases{/id}","deployments_url":"https://api.github.com/repos/pederkl/cl-pdf/deployments","created_at":"2015-05-23T09:48:41Z","updated_at":"2016-02-06T23:58:26Z","pushed_at":"2016-02-07T00:09:10Z","git_url":"git://github.com/pederkl/cl-pdf.git","ssh_url":"git@github.com:pederkl/cl-pdf.git","clone_url":"https://github.com/pederkl/cl-pdf.git","svn_url":"https://github.com/pederkl/cl-pdf","homepage":null,"size":1264,"stargazers_count":0,"watchers_count":0,"language":"Common Lisp","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mbattyani:master","ref":"master","sha":"b26a3a23bd139127556f1709e4afbde0d2336e16","user":{"login":"mbattyani","id":3339919,"avatar_url":"https://avatars.githubusercontent.com/u/3339919?v=3","gravatar_id":"","url":"https://api.github.com/users/mbattyani","html_url":"https://github.com/mbattyani","followers_url":"https://api.github.com/users/mbattyani/followers","following_url":"https://api.github.com/users/mbattyani/following{/other_user}","gists_url":"https://api.github.com/users/mbattyani/gists{/gist_id}","starred_url":"https://api.github.com/users/mbattyani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbattyani/subscriptions","organizations_url":"https://api.github.com/users/mbattyani/orgs","repos_url":"https://api.github.com/users/mbattyani/repos","events_url":"https://api.github.com/users/mbattyani/events{/privacy}","received_events_url":"https://api.github.com/users/mbattyani/received_events","type":"User","site_admin":false},"repo":{"id":8483906,"name":"cl-pdf","full_name":"mbattyani/cl-pdf","owner":{"login":"mbattyani","id":3339919,"avatar_url":"https://avatars.githubusercontent.com/u/3339919?v=3","gravatar_id":"","url":"https://api.github.com/users/mbattyani","html_url":"https://github.com/mbattyani","followers_url":"https://api.github.com/users/mbattyani/followers","following_url":"https://api.github.com/users/mbattyani/following{/other_user}","gists_url":"https://api.github.com/users/mbattyani/gists{/gist_id}","starred_url":"https://api.github.com/users/mbattyani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbattyani/subscriptions","organizations_url":"https://api.github.com/users/mbattyani/orgs","repos_url":"https://api.github.com/users/mbattyani/repos","events_url":"https://api.github.com/users/mbattyani/events{/privacy}","received_events_url":"https://api.github.com/users/mbattyani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbattyani/cl-pdf","description":"CL-PDF is a cross-platform Common Lisp library for generating PDF files.","fork":false,"url":"https://api.github.com/repos/mbattyani/cl-pdf","forks_url":"https://api.github.com/repos/mbattyani/cl-pdf/forks","keys_url":"https://api.github.com/repos/mbattyani/cl-pdf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbattyani/cl-pdf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbattyani/cl-pdf/teams","hooks_url":"https://api.github.com/repos/mbattyani/cl-pdf/hooks","issue_events_url":"https://api.github.com/repos/mbattyani/cl-pdf/issues/events{/number}","events_url":"https://api.github.com/repos/mbattyani/cl-pdf/events","assignees_url":"https://api.github.com/repos/mbattyani/cl-pdf/assignees{/user}","branches_url":"https://api.github.com/repos/mbattyani/cl-pdf/branches{/branch}","tags_url":"https://api.github.com/repos/mbattyani/cl-pdf/tags","blobs_url":"https://api.github.com/repos/mbattyani/cl-pdf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbattyani/cl-pdf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbattyani/cl-pdf/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbattyani/cl-pdf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbattyani/cl-pdf/statuses/{sha}","languages_url":"https://api.github.com/repos/mbattyani/cl-pdf/languages","stargazers_url":"https://api.github.com/repos/mbattyani/cl-pdf/stargazers","contributors_url":"https://api.github.com/repos/mbattyani/cl-pdf/contributors","subscribers_url":"https://api.github.com/repos/mbattyani/cl-pdf/subscribers","subscription_url":"https://api.github.com/repos/mbattyani/cl-pdf/subscription","commits_url":"https://api.github.com/repos/mbattyani/cl-pdf/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbattyani/cl-pdf/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbattyani/cl-pdf/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbattyani/cl-pdf/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbattyani/cl-pdf/contents/{+path}","compare_url":"https://api.github.com/repos/mbattyani/cl-pdf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbattyani/cl-pdf/merges","archive_url":"https://api.github.com/repos/mbattyani/cl-pdf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbattyani/cl-pdf/downloads","issues_url":"https://api.github.com/repos/mbattyani/cl-pdf/issues{/number}","pulls_url":"https://api.github.com/repos/mbattyani/cl-pdf/pulls{/number}","milestones_url":"https://api.github.com/repos/mbattyani/cl-pdf/milestones{/number}","notifications_url":"https://api.github.com/repos/mbattyani/cl-pdf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbattyani/cl-pdf/labels{/name}","releases_url":"https://api.github.com/repos/mbattyani/cl-pdf/releases{/id}","deployments_url":"https://api.github.com/repos/mbattyani/cl-pdf/deployments","created_at":"2013-02-28T17:16:18Z","updated_at":"2015-12-22T17:26:56Z","pushed_at":"2015-08-24T13:56:22Z","git_url":"git://github.com/mbattyani/cl-pdf.git","ssh_url":"git@github.com:mbattyani/cl-pdf.git","clone_url":"https://github.com/mbattyani/cl-pdf.git","svn_url":"https://github.com/mbattyani/cl-pdf","homepage":null,"size":1430,"stargazers_count":36,"watchers_count":36,"language":"Common Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":1,"forks":11,"open_issues":1,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7"},"html":{"href":"https://github.com/mbattyani/cl-pdf/pull/7"},"issue":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/issues/7"},"comments":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/mbattyani/cl-pdf/statuses/bb43f2153c0ab53ff190d3e61872ae141ab982cf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":47,"deletions":2,"changed_files":2}}