• If you are using the Product Add-ons plugin for WooCommerce, and said addon field is a file upload field, this causes the entire file to print garbled. Text is squished, uses a random web font, logo doesn’t print. I have tested this several times with several orders and this happens each and every time and ONLY when the invoice includes a file link. I will also note that this only seems to happen when I print from my phone or tablet using cloud print. I’m guessing that it has something to do with the fact that the pdf creates a link from that file entry.

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Kahil,
    I’m not sure I fully understand, but are you saying you only get this error when printing via cloud print? What happens if you open this PDF on a PC?
    If you can send such a corrupted PDF to support@wpovernight.com I can take a look for you!

    Ewout

    Thread Starter Kahil

    (@kahil)

    There is no PDF to send. This only happens when printing via cloud print and only when there is a file link in the meta. It appears that the link formatting for the PDF is the cause. Don’t know if you’re able to remove the formatting or not on your end.

    When it happens, half the text is positioned oddly, the logo is gone and it isn’t using the correct font.

    On an unrelated note…why doesn’t the logo ever display clearly? It is clearly displaying only a low res version regardless of the size, DPI or quality of the graphic set in the settings.

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Kahil,
    I haven’t seen such issues with link formatting. The oddly positioned text is something I have seen before, but in all those instances there was an issue with the font loading. Could you still send me a PDF though, so I can see if I can find if there’s something wrong with the output, or a way to fix it?

    A HTML snippet of the offending output would help even more!

    Regarding the logo issues, I think this is format related (as mentioned in the other thread you replied to). If you’re using PNG, try JPG. If the file you are using is already JPG, could you send it to me so I can take a look at it?

    Thanks!
    Ewout

    Thread Starter Kahil

    (@kahil)

    That’s just it… If I view and save the PDF on my computer, it displays correctly. The issue comes in when you use Google Cloud Print. It behaves as though there is added data, in this case the html formatting for the link, and it doesn’t handle it well.

    I can’t send one as it will have client info on it….but this is very easy to test as this is how I figured out it was specific to this specific scenario.

    Just set up a product that uses the WooThemes Product Add-on plugin…or something like it…then set it up with a file upload field. When you get the invoice and view it, you’ll notice that the file.png part will be underlined and clickable like an HTML link. I use Google Cloud Print so I can view and print the invoice from my phone and have it ready on the printer when I get home. Again…if I print it out from my laptop, it looks fine. It only looks messed up when I print from Cloud Print. Uses an odd font…things are squished and mal-positioned and the logo is completely missing.

    Plugin Contributor Ewout

    (@pomegranate)

    Hi Kahil,
    I don’t have WooThemes Product Add-ons. Please send me a HTML snippet of the HTML created by Product Add-ons! You can remove all client related information and/or server paths, as long as the basic HTML formatting is the same. Yes I understand it’s only when using Cloud Print, but I want to know if I can find the root cause of this issue, which may already be apparant from the HTML.

    If you are using a template which uses a custom font or any other customizations, I need the template files too (again, you can remove everything confidential).

    Ewout

    Thread Starter Kahil

    (@kahil)

    It’s just a standard file upload form field.

    When it is loaded into your template from the custom field, which is all Product Add-ons does, it is creating a link that points to the file location on the server. A solution I can think of, which I’ve used on websites before, is to strip the html for links.

    That way, instead of outputting: <a href="yadayadayada.com/folder/file.png">file.png</a>

    …all you would get in the end is just file.png

    OR…a simpler solution to try would be to just allow us to not include specific fields from the pdf.

    Plugin Contributor Ewout

    (@pomegranate)

    allow us to not include specific fields from the pdf.

    You can already do that with CSS. Open the HTML (using the setting on the Status tab) then find the class of this specific field. It will probably be something like ‘variation-File’.

    .variation-File { display: none; }

    Ewout

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Invoice is garbled if included custom field is a file’ is closed to new replies.