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

URL #13

Open
tazmancoder opened this issue Nov 2, 2024 · 4 comments
Open

URL #13

tazmancoder opened this issue Nov 2, 2024 · 4 comments

Comments

@tazmancoder
Copy link

First, I’m very interested in this library for an app I’ve been developing.

  1. Is there a way to get the URL of the created PDF?
  2. Where is the PDF located and with what name?
  3. Can you give the PDF a different name?
  4. Also, I like the table example, the only thing is I’m a junior dev. How could I use that with a Swift Data object that is called a program and has multiple songs per program.

‘anyway, I’d love to hear your thoughts or when this library might be out of beta.

@dkyowell
Copy link
Owner

renderPDF() returns the pdf as an in-memory Data type. From there, you can persist the data if you like using Data.writeTo and give it whatever name or url you like.

The Table block operates on an array of a single data type and not with nested data as you describe. If you need to produce a report on a single program, pass program.songs as the data array for Table. If you need to produce a report on several programs, you would need to "flatten your data first". e.g:

Program Name; Program Year Released; Song Number; Song Name

Prog Name 1. 2024 1 Song Name 1
Prog Name 1. 2024 2 Song Name 2
Prog Name 1. 2024 3 Song Name 3
Prog Name 2. 2020 1 Song Name 1
Prog Name 2. 2020 2 Song Name 2
Prog Name 2. 2020 3 Song Name 3

I don't think I have implemented it yet, but at some point, a Table will be able to be nested within another Table and you would be able to pass [programs] to the outer table and program.songs to the inner table...

I hope this is enough info to help you get started.

I have not been actively working on this for several months. The soonest I foresee this coming out of beta would be a year from now.

@tazmancoder
Copy link
Author

tazmancoder commented Nov 14, 2024 via email

@dkyowell
Copy link
Owner

I would not use it in an app you plan to submit to the AppStore, but it is safe for personal projects.

@tazmancoder
Copy link
Author

tazmancoder commented Nov 14, 2024 via email

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

No branches or pull requests

2 participants