We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

PDF generator plugin for Verge3D

Home Forums Plugins PDF generator plugin for Verge3D

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #63297
    kdv
    Participant

    html2pdf.bundle.js is here.

    You can download it and use locally from the app’s folder if needed.

    The cf_pdf() function is somewhere in the plugin’s files. In any case you’ll have to modify one of the plugin’s files so the second variant is preferable.

    They could easily add an option for scaling to adjust it via puzzles…

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #63307
    Pandern
    Customer

    Thank you!

    That was very helpful!

    Changing the value in the html2pdf.bundle.js didn’t make any difference for me, but i might have done something wrong. So I changed the cf_pdf() function in the visual_logic.js, making sure to reapply the changes every time I saved the puzzles. That worked fine.

    As you have mentioned in an earlier post, the images are still low rez. I set the screen scale to 3 with a puzzle before taking the pictures, but the app ignores that. I believe the resolution of the output must be increased to be able to get better screenshots.

    The PDF-file looks perfect in the developer preview before export. And when I fill the whole 4k screen, the image quality is better. So I think that it is also dependable on the screen size at the point of conversion to PDF.

    A few more options to set scale and/or size would be a neat feature of this plugin.

    Attachments:
    You must be logged in to view attached files.
    #63312
    kdv
    Participant

    So I changed the cf_pdf() function in the visual_logic.js, making sure to reapply the changes every time I saved the puzzles.

    You could do it only once in one of the plugin’s files (suppose, it’s generate_pdf.block or a file with a similar name)

    So I think that it is also dependable on the screen size at the point of conversion to PDF.

    It depends on the real app’s canvas size (window size / device pixel ratio) and the current screen scale.

    Try to set the page scale to 4 for better results. I use this expression to set the output page scale to fix the issue described here
    const pageScale = ((app.renderer.domElement.width / window.devicePixelRatio / window.innerWidth) * 4).toFixed(0);

    Attachments:
    You must be logged in to view attached files.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #65883
    David Duperron
    Customer

    @kdv77kdv It looks very promising, I’ve just bought the plugin (and two of yours!), but I can’t figure out how to change point of view and take several screenshots to add to my pdf.
    The tween camera does not seem to work when used inside the generate pdf puzzle, even with the once finished option…
    How did you achive this in your example??
    Thanks

    David

    #65894
    kdv
    Participant

    Look up and see the attached screenshot.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #65896
    David Duperron
    Customer

    Thank you so much! as usual the answer was already there…
    Thank you again to take the time to point us to the right direction!

    #67223
    brotchen
    Participant

    Hello,

    I was trying to update a project and rework the puzzle, but it seems I can’t generate a pdf anymore.
    I have this message showing in the dev console when i try to generate a pdf (see screenshot).
    I’m using verge3D version 3.9.1.

    Any help would be greatly appreciated.

    Attachments:
    You must be logged in to view attached files.
    #67225
    kdv
    Participant

    Looks like now none of this plugin users can. The core script html2pdf.bundle.js has been deleted from there.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #67226
    brotchen
    Participant

    let’s hope the plugin is fixed. I sent an email to their support “info@cyber-fox.net”. Let’s see if I get an answer.

    EDIT : It has been fixed! The script was reuploaded to the adress https://dendrofen.github.io/verge3d/html2pdf.bundle.js All is good!

    • This reply was modified 1 year, 1 month ago by brotchen.
    • This reply was modified 1 year, 1 month ago by brotchen.
    #67230
    kdv
    Participant

    You’d better save a local copy of this script to avoid surprises in the future.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #67231
    brotchen
    Participant

    I did, but with my limited skills, I couldn’t make the plugin work with just my html2pdf.bundle.js file in my app folder.

Viewing 11 posts - 16 through 26 (of 26 total)
  • You must be logged in to reply to this topic.