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

loading image from sample_output breaks background #67

Open
zakk616 opened this issue Jul 19, 2022 · 3 comments
Open

loading image from sample_output breaks background #67

zakk616 opened this issue Jul 19, 2022 · 3 comments

Comments

@zakk616
Copy link

zakk616 commented Jul 19, 2022

I added rectangle on pdf, picked the json and replaced it in
var sampleOutput = { "page_setup": { "format": [ 612, 792 ], "orientation": "portrait" }, "pages": [ { "version": "4.3.0", "objects": [ { "type": "rect", "version": "4.3.0", "originX": "left", "originY": "top", "left": 422.5, "top": 228, "width": 100, "height": 100, "fill": "#212121", "stroke": null, "strokeWidth": 1, "strokeDashArray": null, "strokeLineCap": "butt", "strokeDashOffset": 0, "strokeLineJoin": "miter", "strokeMiterLimit": 4, "scaleX": 1, "scaleY": 1, "angle": 0, "flipX": false, "flipY": false, "opacity": 1, "shadow": null, "visible": true, "backgroundColor": "", "fillRule": "nonzero", "paintFirst": "fill", "globalCompositeOperation": "source-over", "skewX": 0, "skewY": 0, "uuid": "e4dd4c35-2cdf-4d6f-b5a8-8741f3124854" } ] }, ] }

now when i load it it loads the rectange on page load.

but when i do the same with image. it breaks.

code for image object is:
var sampleOutput = { "page_setup": { "format": [ 612, 792 ], "orientation": "portrait" }, "pages": [ { "version": "4.3.0", "objects": [ { "type": "image", "version": "4.3.0", "originX": "left", "originY": "top", "left": 190, "top": 276, "width": 200, "height": 175, "fill": "rgb(0,0,0)", "stroke": null, "strokeWidth": 0, "strokeDashArray": null, "strokeLineCap": "butt", "strokeDashOffset": 0, "strokeLineJoin": "miter", "strokeMiterLimit": 4, "scaleX": 1, "scaleY": 1, "angle": 0, "flipX": false, "flipY": false, "opacity": 1, "shadow": null, "visible": true, "backgroundColor": "", "fillRule": "nonzero", "paintFirst": "fill", "globalCompositeOperation": "source-over", "skewX": 0, "skewY": 0, "uuid": "a2c8e0ba-b9c8-4884-818d-a0ff640d67c9", "src": "data:image/png;base64,iVBORw................SuQmCC", "crossOrigin": null, "filters": [] } ] } ] };

try to resolve this issue.

@adeelahmed233
Copy link

I am facing the same problem. Did you get any solution or workaroud?

@zakk616
Copy link
Author

zakk616 commented Dec 28, 2022

I am facing the same problem. Did you get any solution or workaroud?

not solved yet, just not using image functionality.

@zakk616
Copy link
Author

zakk616 commented Jan 23, 2023

Error Sample:

without image in sample_output.js
image

with image in sample_output.js
image

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