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

allow creating pdf from byte arrays #2

Open
lefnire opened this issue Feb 7, 2010 · 1 comment
Open

allow creating pdf from byte arrays #2

lefnire opened this issue Feb 7, 2010 · 1 comment

Comments

@lefnire
Copy link

lefnire commented Feb 7, 2010

you might add some options{} parameter to be passed in to your initialize(), image(), etc. functions that allow configurable sources (rather than everything coming from a path on the file-system).
For example, I only had to change a couple lines of code to allow the input to come from byte[]:

reader = @pdfreader.new_with_sig("[B", pdf_bytes)

img = image._invoke('getInstance', '[B', image_bytes)

just some way so we can call an overloaded version of your iText function-calls

@jaywhy
Copy link
Owner

jaywhy commented Nov 27, 2012

I think you can pass a byte array to the initialize method already, since it just passes the value to iText. This just needs to be documented.

As for the ability to pass byte arrays to the image method, etc., that is a good idea. I'm back in iText land lately. I'll add those changes. And… Only now did I realize this message is three years old. Whoops.

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