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

Print a vue route with params #17

Open
vargas11 opened this issue Mar 6, 2022 · 4 comments
Open

Print a vue route with params #17

vargas11 opened this issue Mar 6, 2022 · 4 comments

Comments

@vargas11
Copy link

vargas11 commented Mar 6, 2022

Expected Behavior

it's possible to printURL with params?

I have this dynamic endpoint ${process.env.API_URL}/invoice/${this.invoice.id} but I got 404 not found, but if I change the url to a string said http://127.0.0.1:8080/invoice/13, I am able to see invoice.

d.printURL(`${process.env.API_URL}/invoice/${this.invoice.id}`, ({ launchPrint }) => {
    console.log("Content loaded!");
    // fire printing!
    launchPrint();
  });

...

Actual Behavior

...

Steps to Reproduce the Problem

  1. ...
  2. ...
  3. ...

Workaround

...

Specifications

  • Version: v0.0.0
  • Platform: v0.0.0
  • Node version: v0.0.0
  • Browser version: v0.0.0
@joseluisq
Copy link
Owner

BTW Are you using maybe Chrome ? if so what version are you using?

@joseluisq joseluisq self-assigned this Mar 10, 2022
@vargas11
Copy link
Author

Yes I am using chrome Version 98.0.4758.80 (Official Build) (x86_64)

@joseluisq
Copy link
Owner

joseluisq commented Mar 12, 2022

Looks like it's something with your ${process.env.API_URL}/invoice/${this.invoice.id} endpoint and I see it as not related with Printd.
What I recommend is that you have to debug your endpoint and ensure it is valid or if you want you can share an example to be able to reproduce the issue.

@mech01nc01
Copy link

try:

let url=`${process.env.API_URL}/invoice/${this.invoice.id}`;
console.warn('printing url: ', url);
d.printURL(url, ({ launchPrint }) => {
    console.log("Content loaded!");
    // fire printing!
    launchPrint();
  });

what do you get from the console.warn?

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

No branches or pull requests

3 participants