serial pdf no image as background

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279064

-- HikaShop version -- : 3.2.0
-- HikaSerial version -- : 2.0.0
-- Joomla version -- : 3.8
-- PHP version -- : 7.0

Hi,

Just purchased Hikaserial. Took some time to figure it all out, but now it's working. But I can't get the pdf-plugin to generate a coupon with my own background. Tried a test with the "ticket.png", but that doesn't work too. The PNG coupon is fine, but the pdf gives a empty background as if it can't find the base-image. I used the same path as in the png (attachserial) plugin, but it's not working. What could I do wrong?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279075

Hello,

The "PDF template" setting do not accept images ; it requires a PDF file which will be used as a template.
If you want to use a PNG ; you have to use the plugin "attach serial" which is meant to generate images (and not PDF)

Regard,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279145

Hello Jerome,

Yes I thought so too, so I started with a pdf basefile, but the result is the same, no background... Does the pdf need default size and if so, what size? Or am I free to use my own size?

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279148

Hello,

The "PDF template" is based on the "FPDi" library ( www.setasign.com/products/fpdi/about/ )
I made few tests but not with a very large kind of PDF files (since there are a lot of different versions and softwares to generate PDF with their own specificity).
And all my tests where with A4 PDF files.

It is possible to specify an image in the configuration of the plugin (not at the PDF template but as a classical entry).
Since the elements are added in order, if your first entry is the image it will became a background image at the end.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279181

Hi Jerome,

My pdf is about a A5 format, so that should not be a problem then. The file in the attachement is my pdf file. The path is /images/cadeaubon.pdf

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279247

Hello,

Please re-download HikaSerial 2.0.0 in order to get the latest patches.
I made an improvement so you got the indication of your "PDF template" filename is correct
By default the plugin will look into :
1 - The HikaShop upload folder
2 - The HikaShop upload secure folder (upload/safe)
3 - The HikaShop image folder (media/com_hikashop/images)
4 - The Joomla image folder (images/)

You need to provide a relative path for the file. But now the configuration interface will indicate you if the filename is correct or not (once you have save the setting).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279248

Hi Jerome,

Thank you. Unfortunately the indicators message is "image doesn't exist", but it does and is in the right folder.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279250

Hello,

My previous message was there to indicate you that your setting is not correct.
Please read it carefully and change the setting to just put the relative path.
Thanks to the patch you will know when it's right ; in your case you just need to remove the folder (which is not required and invalid at the end).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279309

Hi,

Sorry, my mistake, usually a relative path starts at the root. That's solved, thanks.

The pdf is send to the customer as attachement in the email, but it doesn't show on the orderdetails in the frontend for the customer. The serial info is shown, but no download is available (see screenshot).

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279316

Hello,

If you want to provide a downloadable file ; you need to add a "file" to your product.
And instead of providing an URL, you give the code that the plugin indicates you in the configuration (just below the "yes/no" of the attach as download setting).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279434

Hi,

That's working, thank you. Is this something I could have found in the help information, I could not find anything about this?

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279439

Hello,

www.hikashop.com/support/documentation/1...ns-attachserial.html

Attach as Download - Indicate if the configuration could be use with dynamic download.

The dynamic download system is the key you have to enter to make a "product file" into a dynamic download file.
It's an HikaShop feature that HikaSerial is using.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279498

Hi,

I understand, but nowhere I see any instruction: copy the code beneath the "add as download" button and paste this into the download tab of the product, this is not something you can find out by yourself. Maybe you could add this info to the help (for serial users to come).

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279506

Hi,

I'm trying to get the pdf layout right for a few days now, but I won't succeed. The generated pdf coupon is alwys a two pages pdf, with the text on the wrong place.

I have the source pdf measured in pixels (in Acrobat Pro and Photoshop as well) to get the right position in pixels for the pdf generator fields.

Please advise?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279512

Hello,

Please understand that without any single details about what you're doing ; we can't provide you any useful help.

The plugin is based on the FPDi lib and will use TCPDF or FPDF depending your HikaSerial configuration.
These libs are working by default in millimeters.
tcpdf.org/docs/srcdoc/tcpdf/class-TCPDF/#___construct

Afterwards, the plugin uses the function setXY to place the cursor and then the function multiCell to put some content
tcpdf.org/docs/srcdoc/tcpdf/class-TCPDF/#_SetXY
tcpdf.org/docs/srcdoc/tcpdf/class-TCPDF/#_MultiCell

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279556

Hi,

Thank you! Could it be that I was somewhat misguided as the pdf layoutsheet has pixels as input instead of mm (see screenshot)?

I want to add the price to the giftcard, but none of the fonts accept the standard € (eurosign), see screenshot.

Attachments:
Last edit: 7 years 1 month ago by michelpouli. Reason: added generated pdf

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279598

Hello,

My bad !
Because I forked the "attach serial" plugin to create the "pdf serial" plugin, the configuration view did not evolve a lot.
I'll change that.

Regarding the fonts ; I just included the basis fonts in HikaSerial because the UTF8 fonts are really heavy.
For example the "fonts" folder in TCPDF is 28MB (15MB once compressed).
I didn't want to let HikaSerial package become huge since most of web hosting won't authorize the upload if the installer is bigger than 8MB.

That why, I let a special directory to let users place their fonts.
It's in media/com_hikaserial/fonts/. You will find two folders for the two libs and you can upload the fonts you want there.
The PDF serial plugin will automatically detect the fonts in the configuration so you will be able to have an UTF8 support with the € character.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279640

Hi,

Ok, I did understand and tried that earlier, but I get an error, see screenshot. I placed Arial.ttf in all 3 the folders to be sure, but no success.

Attachments:
Last edit: 7 years 1 month ago by michelpouli.

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 1 month ago #279642

Hello,

You have to put fonts from the TCPDF lib itself.
Unfortunately, it does not work with TTF files ; it needs special converted files.
So please download TCPDF to get the fonts from it.
As I told you the fonts of that lib are huge and I can't include it into HikaSerial.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
7 years 1 month ago #279741

Hi,

Sorry, I think I need some more help by that. Downloaded the package, used the tcpdf_addfont.php to generate pdf font. I get 3 different files (calibri.php; calibri.ctg.z ; calibri.z) wich I copied to media/com_hikaserial/fonts/ . But the new font is still not recognized. The font files are quite small, so maybe I'm doing somtehing wrong?

Please let me know the procedure how to get the correct large files your talking about?

Attachments:

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.094 seconds
Powered by Kunena Forum