Doubts with labels and label printing

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Doubts with labels and label printing

Pak Ricard
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Rafael Chacón
Hi Ricard,

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

Best regards, Rafael.


2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Andrew Galuski

Hello Ricard,

You may want to take a look at PDFQALabel.php and also PDFFGLabel.php.


The first integrates into P/O receiving and the second into W/O processing. You could make a local copy of the first program with your own formats and data fields for printing labels are P/O Receipt Time via a Goods Receipt.

I am printing other information on them but Price and barcode are definitely possible. Labels can also be reprinted using “Reprint GRN” functionality.

 

Best Regards,

Andrew Galuski

 

From: Rafael Chacón [mailto:[hidden email]]
Sent: Monday, September 21, 2015 11:36 AM
To: webERP Developers
Subject: Re: [WebERP-developers] Doubts with labels and label printing

 

Hi Ricard,

 

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

 

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

 

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

 

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

 

Best regards, Rafael.

 

 

2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:

Hi Phil:

 

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

 

1) Units in PDF points or mm?

The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).

In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points

In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points

So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

 

2) Can't delete a field

Also, in Labels.php, trying to delete a field shows an error:

Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

 

3) Problem positioning items

I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

 

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

 

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES

(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

 

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES

(4, 2, 'itemcode', 7, 1, 4, 0),

(5, 2, 'price', 2, 1, 4, 0),

(6, 2, 'barcode', 1, 43, 20, 1);

 

 

Would be really appreciated if you could check it out. Thanks!

 

 

Regards,
Ricard


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers

 


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

gsavix
In reply to this post by Rafael Chacón
Very interesting! people make changes and do not make tests for that changes!
For all of us be protect IMO allways one of us must be test to accept changes.
How we could help for improve tests on weberp?

2015-09-21 13:36 GMT-03:00 Rafael Chacón <[hidden email]>:
Hi Ricard,

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

Best regards, Rafael.


2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers




--
gilberto dos santos alves
+55(11)9-8646-5049
sao paulo - sp - brasil





------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

phildaintree
In reply to this post by Pak Ricard
Sorry it has been a long tim since that script and I can't recall off the top of my head about the units used. I know the script was written long after we ditched R & Os library pretty sure it was written using TCPDF but no other library. I can't have done such a good job on this script sorry.

Phil
Phil Daintree
+64 (0)275 567 890

> On 21/09/2015, at 11:44 pm, Pak Ricard <[hidden email]> wrote:
>
> Hi Phil:
>
> I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.
>
> 1) Units in PDF points or mm?
> The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
> In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
> In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
> So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.
>
> 2) Can't delete a field
> Also, in Labels.php, trying to delete a field shows an error:
> Not Acceptable!
> An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
> It's the first time I get this error message, so no clue what it meant. Are you using any specific library?
>
> 3) Problem positioning items
> I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.
>
> Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)
>
> INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
> (2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);
>
> INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
> (4, 2, 'itemcode', 7, 1, 4, 0),
> (5, 2, 'price', 2, 1, 4, 0),
> (6, 2, 'barcode', 1, 43, 20, 1);
>
>
> Would be really appreciated if you could check it out. Thanks!
>
>
> Regards,
> Ricard
> ------------------------------------------------------------------------------
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
If anyone is wondering about the persistently nasty comments made by Tim Schofield and wants the full story please see: http://timschofield.blogspot.com/ Hell hath no fury like a woman (or Tim) scorned
Tim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Tim
I don't think this or all the other emails were meant for me you have the
wrong email address, please remove me from this list.

Thank you

Tim

-----Original Message-----
From: Phil Daintree [mailto:[hidden email]]
Sent: 21 September 2015 20:54
To: webERP Developers
Subject: Re: [WebERP-developers] Doubts with labels and label printing

Sorry it has been a long tim since that script and I can't recall off the
top of my head about the units used. I know the script was written long
after we ditched R & Os library pretty sure it was written using TCPDF but
no other library. I can't have done such a good job on this script sorry.

Phil
Phil Daintree
+64 (0)275 567 890

> On 21/09/2015, at 11:44 pm, Pak Ricard <[hidden email]> wrote:
>
> Hi Phil:
>
> I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing
some issues.
>
> 1) Units in PDF points or mm?
> The title of the script states that all measurements are in PDF points,
but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
> In PDFPrintLabels.php line 134 SELECT statement seems to transform DB
fields in mm to PDF points
> In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF
points
> So not sure if page and label measurements must be done (and stored in DB)
in mm or in PDF points. Looks like it's in mm, but title text and comments
state differently.
>
> 2) Can't delete a field
> Also, in Labels.php, trying to delete a field shows an error:
> Not Acceptable!
> An appropriate representation of the requested resource could not be found
on this server. This error was generated by Mod_Security.
> It's the first time I get this error message, so no clue what it meant.
Are you using any specific library?
>
> 3) Problem positioning items
> I am creating a label with Code, price and barcode. It seems like the
first field is properly positioned (stockid) but not price. Any combination
tried does not position it correctly. Not sure what's wrong. I want Code and
Price on the left half (code in top of the price) and barcode on the right
half. There is no way to position price below stockid.
>
> Here is the definition of label I'm using and the desired position of
fields (I supposed right measurements are in mm)
>
> INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`,
`height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`)
VALUES
> (2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);
>
> INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`,
`vpos`, `hpos`, `fontsize`, `barcode`) VALUES

> (4, 2, 'itemcode', 7, 1, 4, 0),
> (5, 2, 'price', 2, 1, 4, 0),
> (6, 2, 'barcode', 1, 43, 20, 1);
>
>
> Would be really appreciated if you could check it out. Thanks!
>
>
> Regards,
> Ricard
>
----------------------------------------------------------------------------
--
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

----------------------------------------------------------------------------
--
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6140 / Virus Database: 4419/10677 - Release Date: 09/21/15


------------------------------------------------------------------------------
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Pak Ricard
Thanks all for your comments:

I just commited Labels.php and PDFPrintLabel.php with several fixes. Now it works. To be able to center, or right justify fields we should add a new table field (lenght) for every label field. Not done yet.

The problem I face now, is I should create the PDF at 200 dpi, as the labels we want to use are really small and 72 dpi produce a barcode way too long. Label printer is 200 dpi so, I should use its full resolution. Any way to improve the resolution of the PDF file?

Thanks in advance.

Regards,
Ricard

2015-09-22 4:00 GMT+08:00 Tim <[hidden email]>:
I don't think this or all the other emails were meant for me you have the
wrong email address, please remove me from this list.

Thank you

Tim

-----Original Message-----
From: Phil Daintree [mailto:[hidden email]]
Sent: 21 September 2015 20:54
To: webERP Developers
Subject: Re: [WebERP-developers] Doubts with labels and label printing

Sorry it has been a long tim since that script and I can't recall off the
top of my head about the units used. I know the script was written long
after we ditched R & Os library pretty sure it was written using TCPDF but
no other library. I can't have done such a good job on this script sorry.

Phil
Phil Daintree
<a href="tel:%2B64%20%280%29275%20567%20890" value="+64275567890">+64 (0)275 567 890

> On 21/09/2015, at 11:44 pm, Pak Ricard <[hidden email]> wrote:
>
> Hi Phil:
>
> I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing
some issues.
>
> 1) Units in PDF points or mm?
> The title of the script states that all measurements are in PDF points,
but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
> In PDFPrintLabels.php line 134 SELECT statement seems to transform DB
fields in mm to PDF points
> In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF
points
> So not sure if page and label measurements must be done (and stored in DB)
in mm or in PDF points. Looks like it's in mm, but title text and comments
state differently.
>
> 2) Can't delete a field
> Also, in Labels.php, trying to delete a field shows an error:
> Not Acceptable!
> An appropriate representation of the requested resource could not be found
on this server. This error was generated by Mod_Security.
> It's the first time I get this error message, so no clue what it meant.
Are you using any specific library?
>
> 3) Problem positioning items
> I am creating a label with Code, price and barcode. It seems like the
first field is properly positioned (stockid) but not price. Any combination
tried does not position it correctly. Not sure what's wrong. I want Code and
Price on the left half (code in top of the price) and barcode on the right
half. There is no way to position price below stockid.
>
> Here is the definition of label I'm using and the desired position of
fields (I supposed right measurements are in mm)
>
> INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`,
`height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`)
VALUES
> (2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);
>
> INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`,
`vpos`, `hpos`, `fontsize`, `barcode`) VALUES
> (4, 2, 'itemcode', 7, 1, 4, 0),
> (5, 2, 'price', 2, 1, 4, 0),
> (6, 2, 'barcode', 1, 43, 20, 1);
>
>
> Would be really appreciated if you could check it out. Thanks!
>
>
> Regards,
> Ricard
>
----------------------------------------------------------------------------
--
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

----------------------------------------------------------------------------
--
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6140 / Virus Database: 4419/10677 - Release Date: 09/21/15


------------------------------------------------------------------------------
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Pak Ricard
In reply to this post by Rafael Chacón
Hi Rafael:

Further checking with PDF creation in webERP and it seems webERP is using a modified version of TCPDF called CPDF (as I understand from class.pdf.php file).

TCPDF has functionality to print barcodes TCPDF::write1DBarcode but it seems we have been using another library (barcodepack). Any specific reason? 

Thanks.



Regards,
Ricard

2015-09-22 0:36 GMT+08:00 Rafael Chacón <[hidden email]>:
Hi Ricard,

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

Best regards, Rafael.


2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Rafael Chacón

Hi Ricard,

I do not know. Nicola Asuni's TCPDF works fine. I worked with pdf to solve a problem, and I tried to document.

Best regards, Rafael.

El 27/09/2015 21:43, "Pak Ricard" <[hidden email]> escribió:
Hi Rafael:

Further checking with PDF creation in webERP and it seems webERP is using a modified version of TCPDF called CPDF (as I understand from class.pdf.php file).

TCPDF has functionality to print barcodes TCPDF::write1DBarcode but it seems we have been using another library (barcodepack). Any specific reason? 

Thanks.



Regards,
Ricard

<a href="tel:2015-09-22" value="+50620150922" target="_blank">2015-09-22 0:36 GMT+08:00 Rafael Chacón <[hidden email]>:
Hi Ricard,

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

Best regards, Rafael.


<a href="tel:2015-09-21" value="+50620150921" target="_blank">2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Doubts with labels and label printing

Pak Ricard
Thanks Rafael:

I will work it out :-)

Regards,
Ricard

2015-09-28 11:57 GMT+08:00 Rafael Chacón <[hidden email]>:

Hi Ricard,

I do not know. Nicola Asuni's TCPDF works fine. I worked with pdf to solve a problem, and I tried to document.

Best regards, Rafael.

El 27/09/2015 21:43, "Pak Ricard" <[hidden email]> escribió:
Hi Rafael:

Further checking with PDF creation in webERP and it seems webERP is using a modified version of TCPDF called CPDF (as I understand from class.pdf.php file).

TCPDF has functionality to print barcodes TCPDF::write1DBarcode but it seems we have been using another library (barcodepack). Any specific reason? 

Thanks.



Regards,
Ricard

<a href="tel:2015-09-22" value="+50620150922" target="_blank">2015-09-22 0:36 GMT+08:00 Rafael Chacón <[hidden email]>:
Hi Ricard,

PDF, Nicola Asuni's TCPDF, R&OS's PHP Pdf Creation, and FPDF use dot-per-inch (72 dpi = 1 inch).

I do not know Labels.php and PDFPrintLabels.php scripts, but other webERP scripts use dpi, not mm.

I think the problem is that the code has changed from FPDF or PHP_Pdf_Creation to TCPDF, but there are remnants of the old code. Example of this is the height (Y pos): some code measure it from top, other from bottom, and there are functions that do this conversion. Also, you can NOT update TCPDF because there are compatibility problems (I tried this last year).

For standardisation, I think page and label measurements must be stored in DB in dpi. But user interface could be different (user choice? mm, cm, inch, dot, ...).

Best regards, Rafael.


<a href="tel:2015-09-21" value="+50620150921" target="_blank">2015-09-21 5:44 GMT-06:00 Pak Ricard <[hidden email]>:
Hi Phil:

I'm trying to make Labels.php and PDFPrintLabels.php work and I'm facing some issues.

1) Units in PDF points or mm?
The title of the script states that all measurements are in PDF points, but line 11 onwards are meausrements in mm (A4 is 297 x 210 mm, as example).
In PDFPrintLabels.php line 134 SELECT statement seems to transform DB fields in mm to PDF points
In PDFPrintLabels.php line 164 and 165 seems to transform from mm to PDF points
So not sure if page and label measurements must be done (and stored in DB) in mm or in PDF points. Looks like it's in mm, but title text and comments state differently.

2) Can't delete a field
Also, in Labels.php, trying to delete a field shows an error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
It's the first time I get this error message, so no clue what it meant. Are you using any specific library?

3) Problem positioning items
I am creating a label with Code, price and barcode. It seems like the first field is properly positioned (stockid) but not price. Any combination tried does not position it correctly. Not sure what's wrong. I want Code and Price on the left half (code in top of the price) and barcode on the right half. There is no way to position price below stockid.

Here is the definition of label I'm using and the desired position of fields (I supposed right measurements are in mm)

INSERT INTO `labels` (`labelid`, `description`, `pagewidth`, `pageheight`, `height`, `width`, `topmargin`, `leftmargin`, `rowheight`, `columnwidth`) VALUES
(2, 'Zetags T-570', 86.2, 10.2, 10, 86, 0.01, 0.01, 10.1, 86.1);

INSERT INTO `labelfields` (`labelfieldid`, `labelid`, `fieldvalue`, `vpos`, `hpos`, `fontsize`, `barcode`) VALUES
(4, 2, 'itemcode', 7, 1, 4, 0),
(5, 2, 'price', 2, 1, 4, 0),
(6, 2, 'barcode', 1, 43, 20, 1);


Would be really appreciated if you could check it out. Thanks!


Regards,
Ricard

------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------

_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Loading...