mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

Bugs & Feedback #57

Closed Scopestyle closed 6 years ago

Scopestyle commented 8 years ago

Hi @martin-helmich, I have a few questions / issues

Unable to set custom path

Translation -Fixed-

plugin.web2pdf {
        _LOCAL_LANG {
            de.web2pdf.printLabel = PDF Herunterladen
            en.web2pdf.printLabel = Download PDF
    }
}

Unable to render styles with compression on

Unable to render SVG images

Custom path to mpdf

Kind regards,

Erik

Scopestyle commented 8 years ago

Well the language issue I figured out 1 minute after posting, needs to be tx_web2pdf. The question on the templates still stands :smile:

eurokdj commented 8 years ago

I have exactly the same problem : I can't display anthing else than this aweful "Print Current Page" link, instead of the clean icon link that I prepared in a html file that I uploaded in /fileadmin/files/

I am on Typo 7.6.9 under Windows (Wamp) with pre-configured installation (the official Introduction package)

Is this really like this that I have to insert it inside the Constants field of my Template

plugin.tx_web2pdf.view= fileadmin/files/generatepdflink.html

I also tried, just like Scopestyle did,

plugin.tx_web2pdf{
        _LOCAL_LANG {
            fr.web2pdf.printLabel = Version PDF
            en.web2pdf.printLabel = Download PDF
    }
}

No success either (maybe because there is no web2pdf/ folder inside /l10n/fr)

I think I have no other way but modifying the content of typo3conf\ext\web2pdf\Resources\Private\Templates\Pdf\GeneratePdfLink.html, even if I don't think this is good practice...

Scopestyle commented 8 years ago

Hey @eurokdj did you include the config as well? I added the following code in my setup TS and it works for me in 7.6.9:

plugin.tx_web2pdf {
    view {
        templateRootPath = {$plugin.tx_web2pdf.view.templateRootPath}
        partialRootPath = {$plugin.tx_web2pdf.view.partialRootPath}
        layoutRootPath = {$plugin.tx_web2pdf.view.layoutRootPath}
    }

    settings {
        pdfPageFormat = {$plugin.tx_web2pdf.settings.pdfPageFormat}
        pdfPageOrientation = {$plugin.tx_web2pdf.settings.pdfPageOrientation}
        pdfLeftMargin = {$plugin.tx_web2pdf.settings.pdfLeftMargin}
        pdfRightMargin = {$plugin.tx_web2pdf.settings.pdfRightMargin}
        pdfTopMargin = {$plugin.tx_web2pdf.settings.pdfTopMargin}
        pdfStyleSheet = {$plugin.tx_web2pdf.settings.pdfStyleSheet}
        pdfDestination = {$plugin.tx_web2pdf.settings.pdfDestination}
        useCustomHeader = {$plugin.tx_web2pdf.settings.useCustomHeader}
        useCustomFooter = {$plugin.tx_web2pdf.settings.useCustomFooter}

        pdfPregSearch {
            1 =
        }

        pdfPregReplace {
            1 =
        }

        pdfStrSearch {
            1 =
        }

        pdfStrReplace {
            1 =
        }
    }
}

lib.web2pdf = USER
lib.web2pdf {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    pluginName = Pi1
    extensionName = Web2pdf
    vendorName = Mittwald
    controller = Pdf
    action = generatePdfLink
}

plugin.tx_web2pdf {
        _LOCAL_LANG {
            de.web2pdf.printLabel = Datenblatt Herunterladen
            en.web2pdf.printLabel = Download Technical Info
    }
}

I then included the button in my template as:

<f:cObject typoscriptObjectPath="lib.web2pdf" /> 
eurokdj commented 8 years ago

Thank you for your quick reply. At first, I tried exactly the solution you suggested (apart from the last f:cObject line because I did not know exactly where to insert it, you know, I am still quite a beginner...

I did a little adaptation however, since site's default langage is French :

plugin.tx_web2pdf {
        _LOCAL_LANG {
          default.web2pdf.printLabel = Version PDF            
          en.web2pdf.printLabel = Download Technical Info
    }
}

And it worked ! in spite of the fact that, as I mentioned before, there is no web2pdf/ folder inside /l10n/fr

Afterwards, since I really wanted to have an icon instead (even if it would have been possible with CSS too), I made it evolve :

plugin.tx_web2pdf {
        _LOCAL_LANG {
          default.web2pdf.printLabel = <i class="glyphicon glyphicon-save-file"></i>            
          en.web2pdf.printLabel = Download Technical Info
    }
}

And finally I wondered why I should keep all the code part

plugin.tx_web2pdf {
    view {
        templateRootPath = {$plugin.tx_web2pdf.view.templateRootPath}
        partialRootPath = {$plugin.tx_web2pdf.view.partialRootPath}
        layoutRootPath = {$plugin.tx_web2pdf.view.layoutRootPath}
    }

    settings {
(...)
    controller = Pdf
    action = generatePdfLink
}

since it is already inside the extension.

So I took the risk to removing, and my icon is still there :-)

Scopestyle commented 8 years ago

No risk there as you said, the plugin itself also includes the code. Glad you got it figured out!

pstranghoener commented 7 years ago

Could this issue be closed?

r4fx commented 7 years ago

I don't think so, i still have problem with pdfStyleSheet. My print stylesheets are ignored.

pstranghoener commented 6 years ago

@r4fx Please make a new issue if it is not working with with new version 1.2.0 of web2pdf. Thnaks

eurokdj commented 6 years ago

Hello,

Thank you for the code ! Sorry but I completely stopped using Typo3, and the project in which I used the plugin has been abandoned. Therefore I can't test for the moment.

2016-07-13 12:35 GMT+02:00 Scopestyle notifications@github.com:

Hey @eurokdj https://github.com/eurokdj did you include the config as well? I added the following code in my setup TS and it works for me in 7.6.9:

plugin.tx_web2pdf { view { templateRootPath = {$plugin.tx_web2pdf.view.templateRootPath} partialRootPath = {$plugin.tx_web2pdf.view.partialRootPath} layoutRootPath = {$plugin.tx_web2pdf.view.layoutRootPath} }

settings {
    pdfPageFormat = {$plugin.tx_web2pdf.settings.pdfPageFormat}
    pdfPageOrientation = {$plugin.tx_web2pdf.settings.pdfPageOrientation}
    pdfLeftMargin = {$plugin.tx_web2pdf.settings.pdfLeftMargin}
    pdfRightMargin = {$plugin.tx_web2pdf.settings.pdfRightMargin}
    pdfTopMargin = {$plugin.tx_web2pdf.settings.pdfTopMargin}
    pdfStyleSheet = {$plugin.tx_web2pdf.settings.pdfStyleSheet}
    pdfDestination = {$plugin.tx_web2pdf.settings.pdfDestination}
    useCustomHeader = {$plugin.tx_web2pdf.settings.useCustomHeader}
    useCustomFooter = {$plugin.tx_web2pdf.settings.useCustomFooter}

    pdfPregSearch {
        1 =
    }

    pdfPregReplace {
        1 =
    }

    pdfStrSearch {
        1 =
    }

    pdfStrReplace {
        1 =
    }
}

}

lib.web2pdf = USER lib.web2pdf { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run pluginName = Pi1 extensionName = Web2pdf vendorName = Mittwald controller = Pdf action = generatePdfLink }

plugin.tx_web2pdf { _LOCAL_LANG { de.web2pdf.printLabel = Datenblatt Herunterladen en.web2pdf.printLabel = Download Technical Info } }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mittwald/typo3-web2pdf/issues/57#issuecomment-232319059, or mute the thread https://github.com/notifications/unsubscribe/AMCrl7zk33mMxZopAw_uwjrOmzmm7kq8ks5qVL-AgaJpZM4IyzIj .

-- Karine SANCHE Concepteur développeur PHP Java Android Webmaster - Webdesigner - SEO http://www.kdj-webdesign.com