Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDFExternalDocument adds an empty page #247

Closed
divyeshmakwana96 opened this issue Nov 4, 2020 · 2 comments · Fixed by #260
Closed

PDFExternalDocument adds an empty page #247

divyeshmakwana96 opened this issue Nov 4, 2020 · 2 comments · Fixed by #260
Assignees
Labels

Comments

@divyeshmakwana96
Copy link

I recently tried the external pdf document api and it appears that it adds an empty page before.

   let document = PDFDocument(format: format)

    // meta data
    document.info.title = "Title"
    document.info.subject = "Subject"
    if let bundleName = Bundle.main.infoDictionary!["CFBundleName"] as? String  {
        document.info.author = bundleName
    }
    
    if let externalReportURL = Bundle.main.url(forResource: "Cover", withExtension: "pdf") {
        let coverDocument = PDFExternalDocument(url:externalReportURL, pages: 1)
        document.add(externalDocument: coverDocument)
    }
    
    let generator = PDFGenerator(document: document)
    try? generator.generateURL(filename: "report.pdf")
@philprime
Copy link
Member

Hi there,

can you please take a look at the branch feature/247-fixing-empty-external-page and let me know if it resolves your issue.

@philprime philprime added the bug label Jan 3, 2021
philprime pushed a commit that referenced this issue Jan 6, 2021
@philprime
Copy link
Member

Fixed in branch develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants