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

printResolution not defined in the code, walkaround provided #110

Open
jasonfish568 opened this issue Mar 11, 2023 · 0 comments
Open

printResolution not defined in the code, walkaround provided #110

jasonfish568 opened this issue Mar 11, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jasonfish568
Copy link

As this repo is basically abandoned by the owner, I'm just providing a walkaround for this issue. It took me half a day to locate the variable, hope it helps.

If you use the print function to print documents in small page size, you may find the blury effect. To solve this, you will need to define the printResolution. This variable is included once in the code, but was never initialized.

Fortunately, this variable is stored in the AppOptions variable, so just do the following:

<vue-pdf-app :pdf="filePdfUrl" :fileName="filePdfName" @open="openHandler"></vue-pdf-app>
async openHandler(pdfApp) { 
    pdfApp.preferences.prefs.printResolution = 300; // Set resolution
    pdfApp._readPreferences(); // Update cached preferences
}
@jasonfish568 jasonfish568 added the bug Something isn't working label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants