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

generating pdf with list of images #42

Closed
Yewhenii opened this issue Aug 2, 2017 · 8 comments
Closed

generating pdf with list of images #42

Yewhenii opened this issue Aug 2, 2017 · 8 comments

Comments

@Yewhenii
Copy link

Yewhenii commented Aug 2, 2017

Is it possible to create such number of pdf pages as amount of images?
My generated pdf looks like that

ezgif-1-227e20d892

I want to show one item per page

@cesarvr
Copy link
Owner

cesarvr commented Aug 2, 2017

Sure, you just need to style your html with some centre div and predefined margins (top, bottom) and then tune it up using the print preview in Chrome (window.print()), that would give you an idea of the final result.

@Yewhenii
Copy link
Author

Yewhenii commented Aug 2, 2017

Thanks for quick answer. Im trying to tune this right now but I hoped there is some tool or feature to make each page separately or make some html template for the one and duplicate for another with different images (something like foreach)

@cesarvr
Copy link
Owner

cesarvr commented Aug 2, 2017

Sorry, the plugin is using a offscreen Webkit so basically is a WYSIWYG. :)

@mj6uc
Copy link

mj6uc commented Aug 9, 2017

Hello,

On iOS
I am using this as the data:
Hello <img src="file:///var/mobile/Containers/Data/Application/6DF0F18C-7063-4993-9194-6949A1F76BE6/Library/NoCloud/C3tuFcdv_photo_004.jpg" width="100%" />Hello <img src="file:///var/mobile/Containers/Data/Application/6DF0F18C-7063-4993-9194-6949A1F76BE6/Library/NoCloud/e62xLcdv_photo_005.jpg" width="100%" />

The image exists at that path. However the PDF comes up with only two "Hello" -- no images. What am I doing wrong?

@cesarvr
Copy link
Owner

cesarvr commented Aug 10, 2017

@mj6uc did you try to load the image in Cordova's web browser, like in your index.html ?

@mj6uc
Copy link

mj6uc commented Aug 10, 2017 via email

@bmagne-bobbies
Copy link

bmagne-bobbies commented Jan 8, 2018

Did you find a solution for your problem @mj6uc ? Facing the same issue right now...

@cesarvr
Copy link
Owner

cesarvr commented Jan 8, 2018

@bmagne-bobbies this demo includes an example loading local files

@cesarvr cesarvr closed this as completed Feb 5, 2018
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

4 participants