Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

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

Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
Hello,

As way to simplify code and make it more efficient, fast, and readable, we are looking to do not have includes/class.pdf.php and used the native TCPDF functions directly.

One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Change to be done:
// Company Logo:
/*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
$pdf->Image(
$_SESSION['LogoFile'],// Name of the file containing the image.
$XXX,// Abscissa from left border to the upper-left corner (LTR).
$Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left corner (LTR).
$WWW,// Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
$HHH,// Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
''// Image format. If not specified, the type is inferred from the file extension.
);// Public function Image() in ~/includes/tcpdf/tcpdf.php

That change needs to done in 35 files:
~/FixedAssetRegister.php
~/PDFFGLabel.php
~/PDFGLJournalCN.php
~/PDFPrintLabel.php
~/PDFQALabel.php
~/PDFReceipt.php
~/PDFRemittanceAdvice.php
~/PrintCustTrans.php
~/PrintCustTransPortrait.php
~/includes/PDFBankingSummaryPageHeader.inc
~/includes/PDFChequeListingPageHeader.inc
~/includes/PDFCOAHeader.inc
~/includes/PDFCustTransListingPageHeader.inc
~/includes/PDFDeliveryDifferencesPageHeader.inc
~/includes/PDFDIFOTPageHeader.inc
~/includes/PDFGLJournalHeaderCN.inc
~/includes/PDFGLJournalHeader.inc
~/includes/PDFGrnHeader.inc
~/includes/PDFOrderPageHeader_generic.inc
~/includes/PDFOrdersInvoicedPageHeader.inc
~/includes/PDFOrderStatusPageHeader.inc
~/includes/PDFPeriodStockTransListingPageHeader.inc
~/includes/PDFPickingListHeader.inc
~/includes/PDFProdSpecHeader.inc
~/includes/PDFQuotationPageHeader.inc
~/includes/PDFQuotationPortraitPageHeader.inc
~/includes/PDFSalesOrder_generic.inc
~/includes/PDFStatementPageHeader.inc
~/includes/PDFStockTransferHeader.inc
~/includes/PDFSuppTransListingPageHeader.inc
~/includes/PDFTopItemsHeader.inc
~/includes/PDFTransPageHeader.inc
~/includes/PDFTransPageHeaderPortrait.inc
~/includes/PDFWOPageHeader.inc
~/includes/PO_PDFOrderPageHeader.inc

I afraid that some of these files are used with customisation. If that is true, please let me know which files are customised, to take the appropriate precautions.

Best regards, Rafael.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

phildaintree

This is a really big job ... it would be good though.

I wonder if the best way might be to take 1 PDF script and re-write it using just native TCPDF functions - rather than look at replacing one function at a time. If the work involved in doing one is documented then perhaps we divide the remainder up if we get any volunteers and work through them one by one. Finally we cut class.pdf.php :-)


It would also be good to lose the .inc files and like you, I think just renaming them to .php under the includes directory would be the answer - I started using .php when I realised the error of my ways so we have some with .php under the includes folder already.

Phil

Phil Daintree
Logic Works Ltd - +64 (0)275 567890
http://www.logicworks.co.nz
On 02/10/16 07:26, Rafael Chacón wrote:
Hello,

As way to simplify code and make it more efficient, fast, and readable, we are looking to do not have includes/class.pdf.php and used the native TCPDF functions directly.

One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Change to be done:
// Company Logo:
/*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
$pdf->Image(
$_SESSION['LogoFile'],// Name of the file containing the image.
$XXX,// Abscissa from left border to the upper-left corner (LTR).
$Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left corner (LTR).
$WWW,// Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
$HHH,// Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
''// Image format. If not specified, the type is inferred from the file extension.
);// Public function Image() in ~/includes/tcpdf/tcpdf.php

That change needs to done in 35 files:
~/FixedAssetRegister.php
~/PDFFGLabel.php
~/PDFGLJournalCN.php
~/PDFPrintLabel.php
~/PDFQALabel.php
~/PDFReceipt.php
~/PDFRemittanceAdvice.php
~/PrintCustTrans.php
~/PrintCustTransPortrait.php
~/includes/PDFBankingSummaryPageHeader.inc
~/includes/PDFChequeListingPageHeader.inc
~/includes/PDFCOAHeader.inc
~/includes/PDFCustTransListingPageHeader.inc
~/includes/PDFDeliveryDifferencesPageHeader.inc
~/includes/PDFDIFOTPageHeader.inc
~/includes/PDFGLJournalHeaderCN.inc
~/includes/PDFGLJournalHeader.inc
~/includes/PDFGrnHeader.inc
~/includes/PDFOrderPageHeader_generic.inc
~/includes/PDFOrdersInvoicedPageHeader.inc
~/includes/PDFOrderStatusPageHeader.inc
~/includes/PDFPeriodStockTransListingPageHeader.inc
~/includes/PDFPickingListHeader.inc
~/includes/PDFProdSpecHeader.inc
~/includes/PDFQuotationPageHeader.inc
~/includes/PDFQuotationPortraitPageHeader.inc
~/includes/PDFSalesOrder_generic.inc
~/includes/PDFStatementPageHeader.inc
~/includes/PDFStockTransferHeader.inc
~/includes/PDFSuppTransListingPageHeader.inc
~/includes/PDFTopItemsHeader.inc
~/includes/PDFTransPageHeader.inc
~/includes/PDFTransPageHeaderPortrait.inc
~/includes/PDFWOPageHeader.inc
~/includes/PO_PDFOrderPageHeader.inc

I afraid that some of these files are used with customisation. If that is true, please let me know which files are customised, to take the appropriate precautions.

Best regards, Rafael.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
In reply to this post by Rafael Chacón
Hi Tim,

I was not thinking in keep class.pdf.php as a wrapper class. I was thinking on simplify code and make it more efficient, fast, and readable. The resources saved on using the native TCPDF functions directly can be invested in new functionalities (and to move to a new form editor).

I explain myself: we can have more options so that customization is done inside an xml file rather than directly on the php code. I hope that will reduce the merge work of upgrades to the custom versions.

I am working on: Set alpha to semi-transparency images; use of several image types rather than jpeg; turn-no/turn-off additional elements; round or not each corner of a rectangle;  turn-no/turn-off a rectangle border; colour fill of a rectangle; style of a line (several types of dots); include Ellipses, regular-polygons and star-polygons; use of soft hyphen ("shy" character), etc.

I think it's best to get as close as possible to html code.

Best regards, Rafael.


2016-10-03 7:09 GMT-06:00 Tim Schofield <[hidden email]>:
Hi Rafael,

As I understand it by retaining class.pdf.php as a wrapper class we
keep the option of changing from TCPDF at some point in the future. In
that case all we would have to do is to change the one class rather
than having to change all the files that use PDF functionality.

Or am I missing something?

Thanks
Tim

On 1 October 2016 at 19:26, Rafael Chacón
<[hidden email]> wrote:
> Hello,
>
> As way to simplify code and make it more efficient, fast, and readable, we
> are looking to do not have includes/class.pdf.php and used the native TCPDF
> functions directly.
>
> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image()
> [from tcpdf.php].
>
> Change to be done:
> // Company Logo:
> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
> $pdf->Image(
> $_SESSION['LogoFile'],// Name of the file containing the image.
> $XXX,// Abscissa from left border to the upper-left corner (LTR).
> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left
> corner (LTR).
> $WWW,// Width of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> $HHH,// Height of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> ''// Image format. If not specified, the type is inferred from the file
> extension.
> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>
> That change needs to done in 35 files:
> ~/FixedAssetRegister.php
> ~/PDFFGLabel.php
> ~/PDFGLJournalCN.php
> ~/PDFPrintLabel.php
> ~/PDFQALabel.php
> ~/PDFReceipt.php
> ~/PDFRemittanceAdvice.php
> ~/PrintCustTrans.php
> ~/PrintCustTransPortrait.php
> ~/includes/PDFBankingSummaryPageHeader.inc
> ~/includes/PDFChequeListingPageHeader.inc
> ~/includes/PDFCOAHeader.inc
> ~/includes/PDFCustTransListingPageHeader.inc
> ~/includes/PDFDeliveryDifferencesPageHeader.inc
> ~/includes/PDFDIFOTPageHeader.inc
> ~/includes/PDFGLJournalHeaderCN.inc
> ~/includes/PDFGLJournalHeader.inc
> ~/includes/PDFGrnHeader.inc
> ~/includes/PDFOrderPageHeader_generic.inc
> ~/includes/PDFOrdersInvoicedPageHeader.inc
> ~/includes/PDFOrderStatusPageHeader.inc
> ~/includes/PDFPeriodStockTransListingPageHeader.inc
> ~/includes/PDFPickingListHeader.inc
> ~/includes/PDFProdSpecHeader.inc
> ~/includes/PDFQuotationPageHeader.inc
> ~/includes/PDFQuotationPortraitPageHeader.inc
> ~/includes/PDFSalesOrder_generic.inc
> ~/includes/PDFStatementPageHeader.inc
> ~/includes/PDFStockTransferHeader.inc
> ~/includes/PDFSuppTransListingPageHeader.inc
> ~/includes/PDFTopItemsHeader.inc
> ~/includes/PDFTransPageHeader.inc
> ~/includes/PDFTransPageHeaderPortrait.inc
> ~/includes/PDFWOPageHeader.inc
> ~/includes/PO_PDFOrderPageHeader.inc
>
> I afraid that some of these files are used with customisation. If that is
> true, please let me know which files are customised, to take the appropriate
> precautions.
>
> Best regards, Rafael.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>



--
Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T   <a href="tel:%2B256%20%280%29%20312%20314%20418" value="+256312314418">+256 (0) 312 314 418
M <a href="tel:%2B256%20%280%29%20752%20963%20325" value="+256752963325">+256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk/


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
http://verdorama.systems/20161002_Quotation.zip (zip 550 Blacklisted file extension detected)

2016-10-03 16:38 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi,

Follow my last email, I enclose an example (if you use it, remember to delete line 113 of PDFQuotation.php when restoring).

There are 3 turn on/off images with a modifiable opacity; format supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
There are 5 turn on/off rectangles with roundable corners, fillable with colour, on/off borders.
There are 7 turn on/off lines with modifiable dot pattern.
There is a turn on/off text.

To hide an element, just modify from <display>yes</display> to <display>no</display> in the XML file.

WARNING: do NOT use Form_Designer because coordinates are from top-left to top-left . I think new Form Designer should be from top-left to top-left, responsible and with new elements.

Best regards, Rafael.
 



2016-10-03 14:21 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi Tim,

I was not thinking in keep class.pdf.php as a wrapper class. I was thinking on simplify code and make it more efficient, fast, and readable. The resources saved on using the native TCPDF functions directly can be invested in new functionalities (and to move to a new form editor).

I explain myself: we can have more options so that customization is done inside an xml file rather than directly on the php code. I hope that will reduce the merge work of upgrades to the custom versions.

I am working on: Set alpha to semi-transparency images; use of several image types rather than jpeg; turn-no/turn-off additional elements; round or not each corner of a rectangle;  turn-no/turn-off a rectangle border; colour fill of a rectangle; style of a line (several types of dots); include Ellipses, regular-polygons and star-polygons; use of soft hyphen ("shy" character), etc.

I think it's best to get as close as possible to html code.

Best regards, Rafael.


<a href="tel:2016-10-03" value="+50620161003" target="_blank">2016-10-03 7:09 GMT-06:00 Tim Schofield <[hidden email]>:
Hi Rafael,

As I understand it by retaining class.pdf.php as a wrapper class we
keep the option of changing from TCPDF at some point in the future. In
that case all we would have to do is to change the one class rather
than having to change all the files that use PDF functionality.

Or am I missing something?

Thanks
Tim

On 1 October 2016 at 19:26, Rafael Chacón
<[hidden email]> wrote:
> Hello,
>
> As way to simplify code and make it more efficient, fast, and readable, we
> are looking to do not have includes/class.pdf.php and used the native TCPDF
> functions directly.
>
> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image()
> [from tcpdf.php].
>
> Change to be done:
> // Company Logo:
> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
> $pdf->Image(
> $_SESSION['LogoFile'],// Name of the file containing the image.
> $XXX,// Abscissa from left border to the upper-left corner (LTR).
> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left
> corner (LTR).
> $WWW,// Width of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> $HHH,// Height of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> ''// Image format. If not specified, the type is inferred from the file
> extension.
> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>
> That change needs to done in 35 files:
> ~/FixedAssetRegister.php
> ~/PDFFGLabel.php
> ~/PDFGLJournalCN.php
> ~/PDFPrintLabel.php
> ~/PDFQALabel.php
> ~/PDFReceipt.php
> ~/PDFRemittanceAdvice.php
> ~/PrintCustTrans.php
> ~/PrintCustTransPortrait.php
> ~/includes/PDFBankingSummaryPageHeader.inc
> ~/includes/PDFChequeListingPageHeader.inc
> ~/includes/PDFCOAHeader.inc
> ~/includes/PDFCustTransListingPageHeader.inc
> ~/includes/PDFDeliveryDifferencesPageHeader.inc
> ~/includes/PDFDIFOTPageHeader.inc
> ~/includes/PDFGLJournalHeaderCN.inc
> ~/includes/PDFGLJournalHeader.inc
> ~/includes/PDFGrnHeader.inc
> ~/includes/PDFOrderPageHeader_generic.inc
> ~/includes/PDFOrdersInvoicedPageHeader.inc
> ~/includes/PDFOrderStatusPageHeader.inc
> ~/includes/PDFPeriodStockTransListingPageHeader.inc
> ~/includes/PDFPickingListHeader.inc
> ~/includes/PDFProdSpecHeader.inc
> ~/includes/PDFQuotationPageHeader.inc
> ~/includes/PDFQuotationPortraitPageHeader.inc
> ~/includes/PDFSalesOrder_generic.inc
> ~/includes/PDFStatementPageHeader.inc
> ~/includes/PDFStockTransferHeader.inc
> ~/includes/PDFSuppTransListingPageHeader.inc
> ~/includes/PDFTopItemsHeader.inc
> ~/includes/PDFTransPageHeader.inc
> ~/includes/PDFTransPageHeaderPortrait.inc
> ~/includes/PDFWOPageHeader.inc
> ~/includes/PO_PDFOrderPageHeader.inc
>
> I afraid that some of these files are used with customisation. If that is
> true, please let me know which files are customised, to take the appropriate
> precautions.
>
> Best regards, Rafael.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>



--
Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T   <a href="tel:%2B256%20%280%29%20312%20314%20418" value="+256312314418" target="_blank">+256 (0) 312 314 418
M <a href="tel:%2B256%20%280%29%20752%20963%20325" value="+256752963325" target="_blank">+256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk/




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

gsavix
hi. please see inside Quotation.xml file 
comments must be  <!--    -->  like html
not /*    */. there are some that i missing on quotation.xml?
regards.

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





2016-10-03 19:49 GMT-03:00 Rafael Chacón <[hidden email]>:
http://verdorama.systems/20161002_Quotation.zip (zip 550 Blacklisted file extension detected)

2016-10-03 16:38 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi,

Follow my last email, I enclose an example (if you use it, remember to delete line 113 of PDFQuotation.php when restoring).

There are 3 turn on/off images with a modifiable opacity; format supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
There are 5 turn on/off rectangles with roundable corners, fillable with colour, on/off borders.
There are 7 turn on/off lines with modifiable dot pattern.
There is a turn on/off text.

To hide an element, just modify from <display>yes</display> to <display>no</display> in the XML file.

WARNING: do NOT use Form_Designer because coordinates are from top-left to top-left . I think new Form Designer should be from top-left to top-left, responsible and with new elements.

Best regards, Rafael.
 



2016-10-03 14:21 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi Tim,

I was not thinking in keep class.pdf.php as a wrapper class. I was thinking on simplify code and make it more efficient, fast, and readable. The resources saved on using the native TCPDF functions directly can be invested in new functionalities (and to move to a new form editor).

I explain myself: we can have more options so that customization is done inside an xml file rather than directly on the php code. I hope that will reduce the merge work of upgrades to the custom versions.

I am working on: Set alpha to semi-transparency images; use of several image types rather than jpeg; turn-no/turn-off additional elements; round or not each corner of a rectangle;  turn-no/turn-off a rectangle border; colour fill of a rectangle; style of a line (several types of dots); include Ellipses, regular-polygons and star-polygons; use of soft hyphen ("shy" character), etc.

I think it's best to get as close as possible to html code.

Best regards, Rafael.


<a href="tel:2016-10-03" value="+50620161003" target="_blank">2016-10-03 7:09 GMT-06:00 Tim Schofield <[hidden email]>:
Hi Rafael,

As I understand it by retaining class.pdf.php as a wrapper class we
keep the option of changing from TCPDF at some point in the future. In
that case all we would have to do is to change the one class rather
than having to change all the files that use PDF functionality.

Or am I missing something?

Thanks
Tim

On 1 October 2016 at 19:26, Rafael Chacón
<[hidden email]> wrote:
> Hello,
>
> As way to simplify code and make it more efficient, fast, and readable, we
> are looking to do not have includes/class.pdf.php and used the native TCPDF
> functions directly.
>
> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image()
> [from tcpdf.php].
>
> Change to be done:
> // Company Logo:
> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
> $pdf->Image(
> $_SESSION['LogoFile'],// Name of the file containing the image.
> $XXX,// Abscissa from left border to the upper-left corner (LTR).
> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left
> corner (LTR).
> $WWW,// Width of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> $HHH,// Height of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> ''// Image format. If not specified, the type is inferred from the file
> extension.
> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>
> That change needs to done in 35 files:
> ~/FixedAssetRegister.php
> ~/PDFFGLabel.php
> ~/PDFGLJournalCN.php
> ~/PDFPrintLabel.php
> ~/PDFQALabel.php
> ~/PDFReceipt.php
> ~/PDFRemittanceAdvice.php
> ~/PrintCustTrans.php
> ~/PrintCustTransPortrait.php
> ~/includes/PDFBankingSummaryPageHeader.inc
> ~/includes/PDFChequeListingPageHeader.inc
> ~/includes/PDFCOAHeader.inc
> ~/includes/PDFCustTransListingPageHeader.inc
> ~/includes/PDFDeliveryDifferencesPageHeader.inc
> ~/includes/PDFDIFOTPageHeader.inc
> ~/includes/PDFGLJournalHeaderCN.inc
> ~/includes/PDFGLJournalHeader.inc
> ~/includes/PDFGrnHeader.inc
> ~/includes/PDFOrderPageHeader_generic.inc
> ~/includes/PDFOrdersInvoicedPageHeader.inc
> ~/includes/PDFOrderStatusPageHeader.inc
> ~/includes/PDFPeriodStockTransListingPageHeader.inc
> ~/includes/PDFPickingListHeader.inc
> ~/includes/PDFProdSpecHeader.inc
> ~/includes/PDFQuotationPageHeader.inc
> ~/includes/PDFQuotationPortraitPageHeader.inc
> ~/includes/PDFSalesOrder_generic.inc
> ~/includes/PDFStatementPageHeader.inc
> ~/includes/PDFStockTransferHeader.inc
> ~/includes/PDFSuppTransListingPageHeader.inc
> ~/includes/PDFTopItemsHeader.inc
> ~/includes/PDFTransPageHeader.inc
> ~/includes/PDFTransPageHeaderPortrait.inc
> ~/includes/PDFWOPageHeader.inc
> ~/includes/PO_PDFOrderPageHeader.inc
>
> I afraid that some of these files are used with customisation. If that is
> true, please let me know which files are customised, to take the appropriate
> precautions.
>
> Best regards, Rafael.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>



--
Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T   <a href="tel:%2B256%20%280%29%20312%20314%20418" value="+256312314418" target="_blank">+256 (0) 312 314 418
M <a href="tel:%2B256%20%280%29%20752%20963%20325" value="+256752963325" target="_blank">+256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk/




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
Hi Gilberto,

About the linked script: It is a follow of my previous email. It is an example to show that we are trying to do when using the native TCPDF functions directly instead of includes/class.pdf.php. Obviously, it will simplify code and make it more efficient, fast, and readable (but we are going to not have class.pdf.php as a wrapper class). But the important is that the resources saved will be invested in new functionalities (and to move to a new form editor). We are trying to merge all customised versions in one code and do customisation in a XML file. Some of those new options are:

+ There are 3 turn on/off images with a modifiable opacity; image format supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
+ There are 5 turn on/off rectangles with round-able corners, fill-able with colour, on/off borders.
+ There are 7 turn on/off lines with modifiable dot pattern.
+ There is a turn on/off text.

Those options are shown in the linked code. Today, the customisation in quotation should be done inside the script as a pure hard-code. If you compare current quotation with the quotation generated by this linked script, you will see some differences:
+ more images (one as a transparent watermark);
+ rectangles filled with colour, with some rounded corners (not all corners) and without border;
+ new lines with different dot patterns;
+ a new text as imprint.

To hide the above new elements, just modify from <display>yes</display> to <display>no</display> in the XML file. I am working to include all customisations (that I know) as options within the XML file.

If you use this liked script, remember to delete line 113 of PDFQuotation.php when restoring. WARNING: do NOT use Form_Designer because coordinates are from top-left to top-left . I think new Form_Designer should be from top-left to top-left, responsible and with new elements.

Please, tel me know all your comments about this.

Best regards, Rafael.


2016-10-03 17:36 GMT-06:00 gilberto dos santos alves <[hidden email]>:
hi. please see inside Quotation.xml file 
comments must be  <!--    -->  like html
not /*    */. there are some that i missing on quotation.xml?
regards.

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





2016-10-03 19:49 GMT-03:00 Rafael Chacón <[hidden email]>:
http://verdorama.systems/20161002_Quotation.zip (zip 550 Blacklisted file extension detected)

2016-10-03 16:38 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi,

Follow my last email, I enclose an example (if you use it, remember to delete line 113 of PDFQuotation.php when restoring).

There are 3 turn on/off images with a modifiable opacity; format supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
There are 5 turn on/off rectangles with roundable corners, fillable with colour, on/off borders.
There are 7 turn on/off lines with modifiable dot pattern.
There is a turn on/off text.

To hide an element, just modify from <display>yes</display> to <display>no</display> in the XML file.

WARNING: do NOT use Form_Designer because coordinates are from top-left to top-left . I think new Form Designer should be from top-left to top-left, responsible and with new elements.

Best regards, Rafael.
 



2016-10-03 14:21 GMT-06:00 Rafael Chacón <[hidden email]>:
Hi Tim,

I was not thinking in keep class.pdf.php as a wrapper class. I was thinking on simplify code and make it more efficient, fast, and readable. The resources saved on using the native TCPDF functions directly can be invested in new functionalities (and to move to a new form editor).

I explain myself: we can have more options so that customization is done inside an xml file rather than directly on the php code. I hope that will reduce the merge work of upgrades to the custom versions.

I am working on: Set alpha to semi-transparency images; use of several image types rather than jpeg; turn-no/turn-off additional elements; round or not each corner of a rectangle;  turn-no/turn-off a rectangle border; colour fill of a rectangle; style of a line (several types of dots); include Ellipses, regular-polygons and star-polygons; use of soft hyphen ("shy" character), etc.

I think it's best to get as close as possible to html code.

Best regards, Rafael.


<a href="tel:2016-10-03" value="+50620161003" target="_blank">2016-10-03 7:09 GMT-06:00 Tim Schofield <[hidden email]>:
Hi Rafael,

As I understand it by retaining class.pdf.php as a wrapper class we
keep the option of changing from TCPDF at some point in the future. In
that case all we would have to do is to change the one class rather
than having to change all the files that use PDF functionality.

Or am I missing something?

Thanks
Tim

On 1 October 2016 at 19:26, Rafael Chacón
<[hidden email]> wrote:
> Hello,
>
> As way to simplify code and make it more efficient, fast, and readable, we
> are looking to do not have includes/class.pdf.php and used the native TCPDF
> functions directly.
>
> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with Image()
> [from tcpdf.php].
>
> Change to be done:
> // Company Logo:
> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW, $HHH);*/
> $pdf->Image(
> $_SESSION['LogoFile'],// Name of the file containing the image.
> $XXX,// Abscissa from left border to the upper-left corner (LTR).
> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the upper-left
> corner (LTR).
> $WWW,// Width of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> $HHH,// Height of the image in the page. If not specified or equal to zero,
> it is automatically calculated.
> ''// Image format. If not specified, the type is inferred from the file
> extension.
> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>
> That change needs to done in 35 files:
> ~/FixedAssetRegister.php
> ~/PDFFGLabel.php
> ~/PDFGLJournalCN.php
> ~/PDFPrintLabel.php
> ~/PDFQALabel.php
> ~/PDFReceipt.php
> ~/PDFRemittanceAdvice.php
> ~/PrintCustTrans.php
> ~/PrintCustTransPortrait.php
> ~/includes/PDFBankingSummaryPageHeader.inc
> ~/includes/PDFChequeListingPageHeader.inc
> ~/includes/PDFCOAHeader.inc
> ~/includes/PDFCustTransListingPageHeader.inc
> ~/includes/PDFDeliveryDifferencesPageHeader.inc
> ~/includes/PDFDIFOTPageHeader.inc
> ~/includes/PDFGLJournalHeaderCN.inc
> ~/includes/PDFGLJournalHeader.inc
> ~/includes/PDFGrnHeader.inc
> ~/includes/PDFOrderPageHeader_generic.inc
> ~/includes/PDFOrdersInvoicedPageHeader.inc
> ~/includes/PDFOrderStatusPageHeader.inc
> ~/includes/PDFPeriodStockTransListingPageHeader.inc
> ~/includes/PDFPickingListHeader.inc
> ~/includes/PDFProdSpecHeader.inc
> ~/includes/PDFQuotationPageHeader.inc
> ~/includes/PDFQuotationPortraitPageHeader.inc
> ~/includes/PDFSalesOrder_generic.inc
> ~/includes/PDFStatementPageHeader.inc
> ~/includes/PDFStockTransferHeader.inc
> ~/includes/PDFSuppTransListingPageHeader.inc
> ~/includes/PDFTopItemsHeader.inc
> ~/includes/PDFTransPageHeader.inc
> ~/includes/PDFTransPageHeaderPortrait.inc
> ~/includes/PDFWOPageHeader.inc
> ~/includes/PO_PDFOrderPageHeader.inc
>
> I afraid that some of these files are used with customisation. If that is
> true, please let me know which files are customised, to take the appropriate
> precautions.
>
> Best regards, Rafael.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>



--
Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T   <a href="tel:%2B256%20%280%29%20312%20314%20418" value="+256312314418" target="_blank">+256 (0) 312 314 418
M <a href="tel:%2B256%20%280%29%20752%20963%20325" value="+256752963325" target="_blank">+256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk/




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

phildaintree
On 2016-10-04 08:35, Rafael Chacón wrote:

> Hi Gilberto,
>
> About the linked script: It is a follow of my previous email. It is an
> example to show that we are trying to do when using the native TCPDF
> functions directly instead of includes/class.pdf.php. Obviously, it
> will simplify code and make it more efficient, fast, and readable (but
> we are going to not have class.pdf.php as a wrapper class). But the
> important is that the resources saved will be invested in new
> functionalities (and to move to a new form editor). We are trying to
> merge all customised versions in one code and do customisation in a
> XML file. Some of those new options are:
>
> + There are 3 turn on/off images with a modifiable opacity; image
> format supported with our old TCPDF version: GD, GD2, GD2PART, GIF,
> JPEG, PNG, BMP, XBM, XPM.
>
> + There are 5 turn on/off rectangles with round-able corners,
> fill-able with colour, on/off borders.
> + There are 7 turn on/off lines with modifiable dot pattern.
> + There is a turn on/off text.
>
> Those options are shown in the linked code. Today, the customisation
> in quotation should be done inside the script as a pure hard-code. If
> you compare current quotation with the quotation generated by this
> linked script, you will see some differences:
> + more images (one as a transparent watermark);
> + rectangles filled with colour, with some rounded corners (not all
> corners) and without border;
> + new lines with different dot patterns;
> + a new text as imprint.
>
> To hide the above new elements, just modify from
> <display>yes</display> to <display>no</display> in the XML file. I am
> working to include all customisations (that I know) as options within
> the XML file.
>
> If you use this liked script, remember to delete line 113 of
> PDFQuotation.php when restoring. WARNING: do NOT use Form_Designer
> because coordinates are from top-left to top-left . I think new
> Form_Designer should be from top-left to top-left, responsible and
> with new elements.
>
> Please, tel me know all your comments about this.
>
> Best regards, Rafael.
>
> 2016-10-03 17:36 GMT-06:00 gilberto dos santos alves
> <[hidden email]>:
>
>> hi. please see inside Quotation.xml file
>> comments must be  <!--    -->  like html
>> not /*    */. there are some that i missing on quotation.xml?
>> regards.
>>
>> --
>> gilberto dos santos alves
>> +55(11)9-8646-5049
>> sao paulo - sp - brasil
>>
>> 2016-10-03 19:49 GMT-03:00 Rafael Chacón
>> <[hidden email]>:
>>
>> http://verdorama.systems/20161002_Quotation.zip [1] (zip 550
>> Blacklisted file extension detected)
>>
>> 2016-10-03 16:38 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi,
>>
>> Follow my last email, I enclose an example (if you use it, remember
>> to delete line 113 of PDFQuotation.php when restoring).
>>
>> There are 3 turn on/off images with a modifiable opacity; format
>> supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG,
>> PNG, BMP, XBM, XPM.
>> There are 5 turn on/off rectangles with roundable corners, fillable
>> with colour, on/off borders.
>> There are 7 turn on/off lines with modifiable dot pattern.
>> There is a turn on/off text.
>>
>> To hide an element, just modify from <display>yes</display> to
>> <display>NO</display> in the XML file.
>>
>> WARNING: do NOT use Form_Designer because coordinates are from
>> top-left to top-left . I think new Form Designer should be from
>> top-left to top-left, responsible and with new elements.
>>
>> Best regards, Rafael.
>>
>> 2016-10-03 14:21 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi Tim,
>>
>> I was not thinking in keep class.pdf.php as a wrapper class. I was
>> thinking on simplify code and make it more efficient, fast, and
>> readable. The resources saved on using the native TCPDF functions
>> directly can be invested in new functionalities (and to move to a
>> new form editor).
>>
>> I explain myself: we can have more options so that customization is
>> done inside an xml file rather than directly on the php code. I hope
>> that will reduce the merge work of upgrades to the custom versions.
>>
>> I am working on: Set alpha to semi-transparency images; use of
>> several image types rather than jpeg; turn-no/turn-off additional
>> elements; round or not each corner of a rectangle;  turn-no/turn-off
>> a rectangle border; colour fill of a rectangle; style of a line
>> (several types of dots); include Ellipses, regular-polygons and
>> star-polygons; use of soft hyphen ("shy" character), etc.
>>
>> I think it's best to get as close as possible to html code.
>>
>> Best regards, Rafael.
>>
>> 2016-10-03 [2] 7:09 GMT-06:00 Tim Schofield
>> <[hidden email]>:
>> Hi Rafael,
>>
>> As I understand it by retaining class.pdf.php as a wrapper class we
>> keep the option of changing from TCPDF at some point in the future.
>> In
>> that case all we would have to do is to change the one class rather
>> than having to change all the files that use PDF functionality.
>>
>> Or am I missing something?
>>
>> Thanks
>> Tim
>>
>> On 1 October 2016 at 19:26, Rafael Chacón
>>
>> <[hidden email]> wrote:
>>> Hello,
>>>
>>> As way to simplify code and make it more efficient, fast, and
>> readable, we
>>> are looking to do not have includes/class.pdf.php and used the
>> native TCPDF
>>> functions directly.
>>>
>>> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with
>> Image()
>>> [from tcpdf.php].
>>>
>>> Change to be done:
>>> // Company Logo:
>>> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW,
>> $HHH);*/
>>> $pdf->Image(
>>> $_SESSION['LogoFile'],// Name of the file containing the image.
>>> $XXX,// Abscissa from left border to the upper-left corner (LTR).
>>> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the
>> upper-left
>>> corner (LTR).
>>> $WWW,// Width of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> $HHH,// Height of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> ''// Image format. If not specified, the type is inferred from the
>> file
>>> extension.
>>> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>>>
>>> That change needs to done in 35 files:
>>> ~/FixedAssetRegister.php
>>> ~/PDFFGLabel.php
>>> ~/PDFGLJournalCN.php
>>> ~/PDFPrintLabel.php
>>> ~/PDFQALabel.php
>>> ~/PDFReceipt.php
>>> ~/PDFRemittanceAdvice.php
>>> ~/PrintCustTrans.php
>>> ~/PrintCustTransPortrait.php
>>> ~/includes/PDFBankingSummaryPageHeader.inc
>>> ~/includes/PDFChequeListingPageHeader.inc
>>> ~/includes/PDFCOAHeader.inc
>>> ~/includes/PDFCustTransListingPageHeader.inc
>>> ~/includes/PDFDeliveryDifferencesPageHeader.inc
>>> ~/includes/PDFDIFOTPageHeader.inc
>>> ~/includes/PDFGLJournalHeaderCN.inc
>>> ~/includes/PDFGLJournalHeader.inc
>>> ~/includes/PDFGrnHeader.inc
>>> ~/includes/PDFOrderPageHeader_generic.inc
>>> ~/includes/PDFOrdersInvoicedPageHeader.inc
>>> ~/includes/PDFOrderStatusPageHeader.inc
>>> ~/includes/PDFPeriodStockTransListingPageHeader.inc
>>> ~/includes/PDFPickingListHeader.inc
>>> ~/includes/PDFProdSpecHeader.inc
>>> ~/includes/PDFQuotationPageHeader.inc
>>> ~/includes/PDFQuotationPortraitPageHeader.inc
>>> ~/includes/PDFSalesOrder_generic.inc
>>> ~/includes/PDFStatementPageHeader.inc
>>> ~/includes/PDFStockTransferHeader.inc
>>> ~/includes/PDFSuppTransListingPageHeader.inc
>>> ~/includes/PDFTopItemsHeader.inc
>>> ~/includes/PDFTransPageHeader.inc
>>> ~/includes/PDFTransPageHeaderPortrait.inc
>>> ~/includes/PDFWOPageHeader.inc
>>> ~/includes/PO_PDFOrderPageHeader.inc
>>>
>>> I afraid that some of these files are used with customisation. If
>> that is
>>> true, please let me know which files are customised, to take the
>> appropriate
>>> precautions.
>>>
>>> Best regards, Rafael.
>>>
>>
>>>
>>
> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Web-erp-developers mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>> [3]
>>>
>>
>> --
>> Course View Towers,
>> Plot 21 Yusuf Lule Road,
>> Kampala
>> T   +256 (0) 312 314 418 [4]
>> M +256 (0) 752 963 325 [5]
>> www.weberpafrica.com [6]
>> Twitter: @TimSchofield2
>> Blog: http://weberpafrica.blogspot.co.uk/ [7]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
>
>
> Links:
> ------
> [1] http://verdorama.systems/20161002_Quotation.zip
> [2] tel:2016-10-03
> [3] https://lists.sourceforge.net/lists/listinfo/web-erp-developers
> [4] tel:%2B256%20%280%29%20312%20314%20418
> [5] tel:%2B256%20%280%29%20752%20963%20325
> [6] http://www.weberpafrica.com
> [7] http://weberpafrica.blogspot.co.uk/
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Discussion today

phildaintree
In reply to this post by Rafael Chacón
Sorry I just sent this back as a blank reply I was re-reading it.... so
to clarify my understanding
There is an option in TCPDF to create a form in xml with all the fields
defined then put in place via the xml ...

I am undecided on the XML form designer as this is hard to manipulate -
it is clever yes... but if you try to adjust fields etc it is not that
easy. It is really much easier to modify a PHP script to create the pdf
you want in my view. Also the XML form designer is quite limited in the
modifications you can effect.

If we are trying to remove an intermediary script

includes/class.pdf.php

then great... but WOW... a LOT of work involved and whilst it does
remove abstraction, and therefore I like it, it does not actually
provide additional functionality. I'd like it but could not justify the
work to do it personally.

If we are looking to move all pdfs to an XML form/report writer then I
am not sure this is such a good plan because although it allows local
customisation of the XML, the points above:

- not so flexible as writing the PHP script directly
- no easy to visualise as context is all in the PHP script
- the PHP script to create the PDF is miserable to read
PLUS
- parsing of XML has its own overhead.
- file permissions/locations etc have all been issues for the XML

I may not be understanding correctly.

On the subject of using Front Accounting work... it is open source, I am
sure these guys will have no problem giving code back to us... Front
Accounting was originally a fork from webERP!! However, we should ask
them out of courtesy and attribute to those guys that wrote the code, we
may find they are already in our list of contributors!

On the subject of the wikipedia page, I see their concerns - if our page
is simply an advert (it is!) then perhaps it doesn't belong. However, if
other ERP systems warrant a page then why wouldn't we? I have simply
presented the code as available for those that want it and have not
actively promoted webERP as better than another system - up to
individuals to assess the worthiness or not of our system for
themselves. It is good that you are spreading the word - but of lesser
importance to me personally than ensuring the adherence to our basic
principles and code conventions. We are not selling anything - well I'm
not!

Phil





On 2016-10-04 08:35, Rafael Chacón wrote:

> Hi Gilberto,
>
> About the linked script: It is a follow of my previous email. It is an
> example to show that we are trying to do when using the native TCPDF
> functions directly instead of includes/class.pdf.php. Obviously, it
> will simplify code and make it more efficient, fast, and readable (but
> we are going to not have class.pdf.php as a wrapper class). But the
> important is that the resources saved will be invested in new
> functionalities (and to move to a new form editor). We are trying to
> merge all customised versions in one code and do customisation in a
> XML file. Some of those new options are:
>
> + There are 3 turn on/off images with a modifiable opacity; image
> format supported with our old TCPDF version: GD, GD2, GD2PART, GIF,
> JPEG, PNG, BMP, XBM, XPM.
>
> + There are 5 turn on/off rectangles with round-able corners,
> fill-able with colour, on/off borders.
> + There are 7 turn on/off lines with modifiable dot pattern.
> + There is a turn on/off text.
>
> Those options are shown in the linked code. Today, the customisation
> in quotation should be done inside the script as a pure hard-code. If
> you compare current quotation with the quotation generated by this
> linked script, you will see some differences:
> + more images (one as a transparent watermark);
> + rectangles filled with colour, with some rounded corners (not all
> corners) and without border;
> + new lines with different dot patterns;
> + a new text as imprint.
>
> To hide the above new elements, just modify from
> <display>yes</display> to <display>no</display> in the XML file. I am
> working to include all customisations (that I know) as options within
> the XML file.
>
> If you use this liked script, remember to delete line 113 of
> PDFQuotation.php when restoring. WARNING: do NOT use Form_Designer
> because coordinates are from top-left to top-left . I think new
> Form_Designer should be from top-left to top-left, responsible and
> with new elements.
>
> Please, tel me know all your comments about this.
>
> Best regards, Rafael.
>
> 2016-10-03 17:36 GMT-06:00 gilberto dos santos alves
> <[hidden email]>:
>
>> hi. please see inside Quotation.xml file
>> comments must be  <!--    -->  like html
>> not /*    */. there are some that i missing on quotation.xml?
>> regards.
>>
>> --
>> gilberto dos santos alves
>> +55(11)9-8646-5049
>> sao paulo - sp - brasil
>>
>> 2016-10-03 19:49 GMT-03:00 Rafael Chacón
>> <[hidden email]>:
>>
>> http://verdorama.systems/20161002_Quotation.zip [1] (zip 550
>> Blacklisted file extension detected)
>>
>> 2016-10-03 16:38 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi,
>>
>> Follow my last email, I enclose an example (if you use it, remember
>> to delete line 113 of PDFQuotation.php when restoring).
>>
>> There are 3 turn on/off images with a modifiable opacity; format
>> supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG,
>> PNG, BMP, XBM, XPM.
>> There are 5 turn on/off rectangles with roundable corners, fillable
>> with colour, on/off borders.
>> There are 7 turn on/off lines with modifiable dot pattern.
>> There is a turn on/off text.
>>
>> To hide an element, just modify from <display>yes</display> to
>> <display>NO</display> in the XML file.
>>
>> WARNING: do NOT use Form_Designer because coordinates are from
>> top-left to top-left . I think new Form Designer should be from
>> top-left to top-left, responsible and with new elements.
>>
>> Best regards, Rafael.
>>
>> 2016-10-03 14:21 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi Tim,
>>
>> I was not thinking in keep class.pdf.php as a wrapper class. I was
>> thinking on simplify code and make it more efficient, fast, and
>> readable. The resources saved on using the native TCPDF functions
>> directly can be invested in new functionalities (and to move to a
>> new form editor).
>>
>> I explain myself: we can have more options so that customization is
>> done inside an xml file rather than directly on the php code. I hope
>> that will reduce the merge work of upgrades to the custom versions.
>>
>> I am working on: Set alpha to semi-transparency images; use of
>> several image types rather than jpeg; turn-no/turn-off additional
>> elements; round or not each corner of a rectangle;  turn-no/turn-off
>> a rectangle border; colour fill of a rectangle; style of a line
>> (several types of dots); include Ellipses, regular-polygons and
>> star-polygons; use of soft hyphen ("shy" character), etc.
>>
>> I think it's best to get as close as possible to html code.
>>
>> Best regards, Rafael.
>>
>> 2016-10-03 [2] 7:09 GMT-06:00 Tim Schofield
>> <[hidden email]>:
>> Hi Rafael,
>>
>> As I understand it by retaining class.pdf.php as a wrapper class we
>> keep the option of changing from TCPDF at some point in the future.
>> In
>> that case all we would have to do is to change the one class rather
>> than having to change all the files that use PDF functionality.
>>
>> Or am I missing something?
>>
>> Thanks
>> Tim
>>
>> On 1 October 2016 at 19:26, Rafael Chacón
>>
>> <[hidden email]> wrote:
>>> Hello,
>>>
>>> As way to simplify code and make it more efficient, fast, and
>> readable, we
>>> are looking to do not have includes/class.pdf.php and used the
>> native TCPDF
>>> functions directly.
>>>
>>> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with
>> Image()
>>> [from tcpdf.php].
>>>
>>> Change to be done:
>>> // Company Logo:
>>> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW,
>> $HHH);*/
>>> $pdf->Image(
>>> $_SESSION['LogoFile'],// Name of the file containing the image.
>>> $XXX,// Abscissa from left border to the upper-left corner (LTR).
>>> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the
>> upper-left
>>> corner (LTR).
>>> $WWW,// Width of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> $HHH,// Height of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> ''// Image format. If not specified, the type is inferred from the
>> file
>>> extension.
>>> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>>>
>>> That change needs to done in 35 files:
>>> ~/FixedAssetRegister.php
>>> ~/PDFFGLabel.php
>>> ~/PDFGLJournalCN.php
>>> ~/PDFPrintLabel.php
>>> ~/PDFQALabel.php
>>> ~/PDFReceipt.php
>>> ~/PDFRemittanceAdvice.php
>>> ~/PrintCustTrans.php
>>> ~/PrintCustTransPortrait.php
>>> ~/includes/PDFBankingSummaryPageHeader.inc
>>> ~/includes/PDFChequeListingPageHeader.inc
>>> ~/includes/PDFCOAHeader.inc
>>> ~/includes/PDFCustTransListingPageHeader.inc
>>> ~/includes/PDFDeliveryDifferencesPageHeader.inc
>>> ~/includes/PDFDIFOTPageHeader.inc
>>> ~/includes/PDFGLJournalHeaderCN.inc
>>> ~/includes/PDFGLJournalHeader.inc
>>> ~/includes/PDFGrnHeader.inc
>>> ~/includes/PDFOrderPageHeader_generic.inc
>>> ~/includes/PDFOrdersInvoicedPageHeader.inc
>>> ~/includes/PDFOrderStatusPageHeader.inc
>>> ~/includes/PDFPeriodStockTransListingPageHeader.inc
>>> ~/includes/PDFPickingListHeader.inc
>>> ~/includes/PDFProdSpecHeader.inc
>>> ~/includes/PDFQuotationPageHeader.inc
>>> ~/includes/PDFQuotationPortraitPageHeader.inc
>>> ~/includes/PDFSalesOrder_generic.inc
>>> ~/includes/PDFStatementPageHeader.inc
>>> ~/includes/PDFStockTransferHeader.inc
>>> ~/includes/PDFSuppTransListingPageHeader.inc
>>> ~/includes/PDFTopItemsHeader.inc
>>> ~/includes/PDFTransPageHeader.inc
>>> ~/includes/PDFTransPageHeaderPortrait.inc
>>> ~/includes/PDFWOPageHeader.inc
>>> ~/includes/PO_PDFOrderPageHeader.inc
>>>
>>> I afraid that some of these files are used with customisation. If
>> that is
>>> true, please let me know which files are customised, to take the
>> appropriate
>>> precautions.
>>>
>>> Best regards, Rafael.
>>>
>>
>>>
>>
> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Web-erp-developers mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>> [3]
>>>
>>
>> --
>> Course View Towers,
>> Plot 21 Yusuf Lule Road,
>> Kampala
>> T   +256 (0) 312 314 418 [4]
>> M +256 (0) 752 963 325 [5]
>> www.weberpafrica.com [6]
>> Twitter: @TimSchofield2
>> Blog: http://weberpafrica.blogspot.co.uk/ [7]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
>
>
> Links:
> ------
> [1] http://verdorama.systems/20161002_Quotation.zip
> [2] tel:2016-10-03
> [3] https://lists.sourceforge.net/lists/listinfo/web-erp-developers
> [4] tel:%2B256%20%280%29%20312%20314%20418
> [5] tel:%2B256%20%280%29%20752%20963%20325
> [6] http://www.weberpafrica.com
> [7] http://weberpafrica.blogspot.co.uk/
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
In reply to this post by phildaintree
Hi,

Interesting! I know that TCPDF can convert from HTML to PDF, but I did not this TCPDF's XML-funcionality. This functionality is consistent with the tendency to use the xhtml instead of other formats: EPUB (ISO 30135) is a ZIPped website, openDocument (ISO 26300) is a zipped XML-based file, SVG (W3C SVG) is a XML text file.

About PHP vs. XML: I think we should separate two things:
1. The features (the "work" done by the software), and
2. The customisation.

The features (part 1) should be in PHP and free, as possible, of javascripts (see: https://www.gnu.org/philosophy/javascript-trap.en.html, https://www.leaseweb.com/labs/2013/07/10-very-good-reasons-to-stop-using-javascript/ ). The customisation (part 2), in the other hand, should be in a separate file or storage.
The reason: if customisation is part of the PHP code, when upgrading the main PHP code, a step of comparisons is needed to merge the differences (and if there are many customers who have personalised their reports, much overhead!).

One of the problems of the R&OS pdf.php is that the coordinates are always from left-bottom corner. For LTR languages, the initial user coordinate system is in the top-left corner (see https://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem). Also, all measures should be to the top-left corner of any element (for LTR languages); AddText and AddTexWarp have different references.

~includes/class.pdf.php inherits those problems and has others. ~includes/class.pdf.php as a wrapper class is very bad: It is not easy to understand, slow, there is an incomplete equivalent from R&OS.pdf.php to tcpdf.php, and we miss some tcpdf functionalities.

Probably, the best solution is to have a "common form/report code" that "encapsulates" the functionality of the underlying class, captures the inflexibility (allows easy adapt or change shape) and hides the complexity (provides a level of abstraction).

To meet the objectives of the project, we have to save resources (less code: ~includes/class.pdf.php) to invest in a code that provides flexibility, separates features from customisation, and improves the readability to newcomers.

Best regards, Rafael.

----------
2016-10-05 19:05 GMT-06:00 <[hidden email]>:

Sorry I just sent this back as a blank reply I was re-reading it.... so
to clarify my understanding
There is an option in TCPDF to create a form in xml with all the fields
defined then put in place via the xml ...

I am undecided on the XML form designer as this is hard to manipulate -
it is clever yes... but if you try to adjust fields etc it is not that
easy. It is really much easier to modify a PHP script to create the pdf
you want in my view. Also the XML form designer is quite limited in the
modifications you can effect.

If we are trying to remove an intermediary script

includes/class.pdf.php

then great... but WOW... a LOT of work involved and whilst it does
remove abstraction, and therefore I like it, it does not actually
provide additional functionality. I'd like it but could not justify the
work to do it personally.

If we are looking to move all pdfs to an XML form/report writer then I
am not sure this is such a good plan because although it allows local
customisation of the XML, the points above:

- not so flexible as writing the PHP script directly
- no easy to visualise as context is all in the PHP script
- the PHP script to create the PDF is miserable to read
PLUS
- parsing of XML has its own overhead.
- file permissions/locations etc have all been issues for the XML

I may not be understanding correctly.

On the subject of using Front Accounting work... it is open source, I am
sure these guys will have no problem giving code back to us... Front
Accounting was originally a fork from webERP!! However, we should ask
them out of courtesy and attribute to those guys that wrote the code, we
may find they are already in our list of contributors!

On the subject of the wikipedia page, I see their concerns - if our page
is simply an advert (it is!) then perhaps it doesn't belong. However, if
other ERP systems warrant a page then why wouldn't we? I have simply
presented the code as available for those that want it and have not
actively promoted webERP as better than another system - up to
individuals to assess the worthiness or not of our system for
themselves. It is good that you are spreading the word - but of lesser
importance to me personally than ensuring the adherence to our basic
principles and code conventions. We are not selling anything - well I'm
not!

Phil
----------
On 2016-10-04 08:35, Rafael Chacón wrote:
> Hi Gilberto,
>
> About the linked script: It is a follow of my previous email. It is an
> example to show that we are trying to do when using the native TCPDF
> functions directly instead of includes/class.pdf.php. Obviously, it
> will simplify code and make it more efficient, fast, and readable (but
> we are going to not have class.pdf.php as a wrapper class). But the
> important is that the resources saved will be invested in new
> functionalities (and to move to a new form editor). We are trying to
> merge all customised versions in one code and do customisation in a
> XML file. Some of those new options are:
>
> + There are 3 turn on/off images with a modifiable opacity; image
> format supported with our old TCPDF version: GD, GD2, GD2PART, GIF,
> JPEG, PNG, BMP, XBM, XPM.
>
> + There are 5 turn on/off rectangles with round-able corners,
> fill-able with colour, on/off borders.
> + There are 7 turn on/off lines with modifiable dot pattern.
> + There is a turn on/off text.
>
> Those options are shown in the linked code. Today, the customisation
> in quotation should be done inside the script as a pure hard-code. If
> you compare current quotation with the quotation generated by this
> linked script, you will see some differences:
> + more images (one as a transparent watermark);
> + rectangles filled with colour, with some rounded corners (not all
> corners) and without border;
> + new lines with different dot patterns;
> + a new text as imprint.
>
> To hide the above new elements, just modify from
> <display>yes</display> to <display>no</display> in the XML file. I am
> working to include all customisations (that I know) as options within
> the XML file.
>
> If you use this liked script, remember to delete line 113 of
> PDFQuotation.php when restoring. WARNING: do NOT use Form_Designer
> because coordinates are from top-left to top-left . I think new
> Form_Designer should be from top-left to top-left, responsible and
> with new elements.
>
> Please, tel me know all your comments about this.
>
> Best regards, Rafael.
>
> 2016-10-03 17:36 GMT-06:00 gilberto dos santos alves
> <[hidden email]>:
>
>> hi. please see inside Quotation.xml file
>> comments must be  <!--    -->  like html
>> not /*    */. there are some that i missing on quotation.xml?
>> regards.
>>
>> --
>> gilberto dos santos alves
>> <a href="tel:%2B55%2811%299-8646-5049" value="+5511986465049">+55(11)9-8646-5049
>> sao paulo - sp - brasil
>>
>> 2016-10-03 19:49 GMT-03:00 Rafael Chacón
>> <[hidden email]>:
>>
>> http://verdorama.systems/20161002_Quotation.zip [1] (zip 550
>> Blacklisted file extension detected)
>>
>> 2016-10-03 16:38 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi,
>>
>> Follow my last email, I enclose an example (if you use it, remember
>> to delete line 113 of PDFQuotation.php when restoring).
>>
>> There are 3 turn on/off images with a modifiable opacity; format
>> supported with our old TCPDF version: GD, GD2, GD2PART, GIF, JPEG,
>> PNG, BMP, XBM, XPM.
>> There are 5 turn on/off rectangles with roundable corners, fillable
>> with colour, on/off borders.
>> There are 7 turn on/off lines with modifiable dot pattern.
>> There is a turn on/off text.
>>
>> To hide an element, just modify from <display>yes</display> to
>> <display>NO</display> in the XML file.
>>
>> WARNING: do NOT use Form_Designer because coordinates are from
>> top-left to top-left . I think new Form Designer should be from
>> top-left to top-left, responsible and with new elements.
>>
>> Best regards, Rafael.
>>
>> 2016-10-03 14:21 GMT-06:00 Rafael Chacón
>> <[hidden email]>:
>>
>> Hi Tim,
>>
>> I was not thinking in keep class.pdf.php as a wrapper class. I was
>> thinking on simplify code and make it more efficient, fast, and
>> readable. The resources saved on using the native TCPDF functions
>> directly can be invested in new functionalities (and to move to a
>> new form editor).
>>
>> I explain myself: we can have more options so that customization is
>> done inside an xml file rather than directly on the php code. I hope
>> that will reduce the merge work of upgrades to the custom versions.
>>
>> I am working on: Set alpha to semi-transparency images; use of
>> several image types rather than jpeg; turn-no/turn-off additional
>> elements; round or not each corner of a rectangle;  turn-no/turn-off
>> a rectangle border; colour fill of a rectangle; style of a line
>> (several types of dots); include Ellipses, regular-polygons and
>> star-polygons; use of soft hyphen ("shy" character), etc.
>>
>> I think it's best to get as close as possible to html code.
>>
>> Best regards, Rafael.
>>
>> <a href="tel:2016-10-03" value="+50620161003">2016-10-03 [2] 7:09 GMT-06:00 Tim Schofield
>> <[hidden email]>:
>> Hi Rafael,
>>
>> As I understand it by retaining class.pdf.php as a wrapper class we
>> keep the option of changing from TCPDF at some point in the future.
>> In
>> that case all we would have to do is to change the one class rather
>> than having to change all the files that use PDF functionality.
>>
>> Or am I missing something?
>>
>> Thanks
>> Tim
>>
>> On 1 October 2016 at 19:26, Rafael Chacón
>>
>> <[hidden email]> wrote:
>>> Hello,
>>>
>>> As way to simplify code and make it more efficient, fast, and
>> readable, we
>>> are looking to do not have includes/class.pdf.php and used the
>> native TCPDF
>>> functions directly.
>>>
>>> One step is to Replace addJpegFromFile() [from R&OS pdf.php] with
>> Image()
>>> [from tcpdf.php].
>>>
>>> Change to be done:
>>> // Company Logo:
>>> /*$pdf->addJpegFromFile($_SESSION['LogoFile'], $XXX, $YYY, $WWW,
>> $HHH);*/
>>> $pdf->Image(
>>> $_SESSION['LogoFile'],// Name of the file containing the image.
>>> $XXX,// Abscissa from left border to the upper-left corner (LTR).
>>> $Page_Height -($YYY) -($HHH),// Ordinate from top border to the
>> upper-left
>>> corner (LTR).
>>> $WWW,// Width of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> $HHH,// Height of the image in the page. If not specified or equal
>> to zero,
>>> it is automatically calculated.
>>> ''// Image format. If not specified, the type is inferred from the
>> file
>>> extension.
>>> );// Public function Image() in ~/includes/tcpdf/tcpdf.php
>>>
>>> That change needs to done in 35 files:
>>> ~/FixedAssetRegister.php
>>> ~/PDFFGLabel.php
>>> ~/PDFGLJournalCN.php
>>> ~/PDFPrintLabel.php
>>> ~/PDFQALabel.php
>>> ~/PDFReceipt.php
>>> ~/PDFRemittanceAdvice.php
>>> ~/PrintCustTrans.php
>>> ~/PrintCustTransPortrait.php
>>> ~/includes/PDFBankingSummaryPageHeader.inc
>>> ~/includes/PDFChequeListingPageHeader.inc
>>> ~/includes/PDFCOAHeader.inc
>>> ~/includes/PDFCustTransListingPageHeader.inc
>>> ~/includes/PDFDeliveryDifferencesPageHeader.inc
>>> ~/includes/PDFDIFOTPageHeader.inc
>>> ~/includes/PDFGLJournalHeaderCN.inc
>>> ~/includes/PDFGLJournalHeader.inc
>>> ~/includes/PDFGrnHeader.inc
>>> ~/includes/PDFOrderPageHeader_generic.inc
>>> ~/includes/PDFOrdersInvoicedPageHeader.inc
>>> ~/includes/PDFOrderStatusPageHeader.inc
>>> ~/includes/PDFPeriodStockTransListingPageHeader.inc
>>> ~/includes/PDFPickingListHeader.inc
>>> ~/includes/PDFProdSpecHeader.inc
>>> ~/includes/PDFQuotationPageHeader.inc
>>> ~/includes/PDFQuotationPortraitPageHeader.inc
>>> ~/includes/PDFSalesOrder_generic.inc
>>> ~/includes/PDFStatementPageHeader.inc
>>> ~/includes/PDFStockTransferHeader.inc
>>> ~/includes/PDFSuppTransListingPageHeader.inc
>>> ~/includes/PDFTopItemsHeader.inc
>>> ~/includes/PDFTransPageHeader.inc
>>> ~/includes/PDFTransPageHeaderPortrait.inc
>>> ~/includes/PDFWOPageHeader.inc
>>> ~/includes/PO_PDFOrderPageHeader.inc
>>>
>>> I afraid that some of these files are used with customisation. If
>> that is
>>> true, please let me know which files are customised, to take the
>> appropriate
>>> precautions.
>>>
>>> Best regards, Rafael.
>>>
>>
>>>
>>
> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Web-erp-developers mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>> [3]
>>>
>>
>> --
>> Course View Towers,
>> Plot 21 Yusuf Lule Road,
>> Kampala
>> T   +256 (0) 312 314 418 [4]
>> M +256 (0) 752 963 325 [5]
>> www.weberpafrica.com [6]
>> Twitter: @TimSchofield2
>> Blog: http://weberpafrica.blogspot.co.uk/ [7]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers [3]
>
>
>
> Links:
> ------
> [1] http://verdorama.systems/20161002_Quotation.zip
> [2] tel:<a href="tel:2016-10-03" value="+50620161003">2016-10-03
> [3] https://lists.sourceforge.net/lists/listinfo/web-erp-developers
> [4] tel:%2B256%20%280%29%20312%20314%20418
> [5] tel:%2B256%20%280%29%20752%20963%20325
> [6] http://www.weberpafrica.com
> [7] http://weberpafrica.blogspot.co.uk/
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Web-erp-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

rfthomas
We do modify a few of the PDF forms (as well as several other scripts - we should get some incorporated into the main trunk as they are of general use) and for each release we need to back in our changes.  For the past several releases (only with respect to PDF) there have been no changes in the information passed and the major libraries (includes), so we are able to just copy the modified scripts.

PDF generation is generally very fast using the existing software.  We find that the database code is where the major overhead resides.

Adding XML is forcing another "dialect" to be learned and mastered in order to make changes.  As we understand it, xml is just a framework that code must interpret, in the case of weberp such would be done utilizing php code.  

We would prefer an execution search hierarchy for scripts, where users would place customized code into customer directories.  We recognize that there is a performance penalty for such.  It would also require that changes that involve database, session, get, or post data incompatibility be documented.

We do agree that the report writer and forms are difficult to use and that the results are not always as expected.  The form designer is missing several forms, e.g. Quotation, Packing Slip, and Credit Notes.  We have not researched the form code.

Is the Sales Invoice form data, i.e. Customer Invoice, actually used in the code?  We have modified the scripts to enable printing customer invoices, credit notes and packing slips from PrintCustTransPortrait.php.

Bob Thomas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replace addJpegFromFile() [from R&OS pdf.php] with Image() [from tcpdf.php].

Rafael Chacón
Hi Bob,

Thank you for your comments.

About PDF forms modifications: I am trying to merge customisation inside the main code as options. My goal is to reduce the re-customisation of the upgrades. I'd be glad to know that kind of customisation you did to see how to incorporate it to the master code.

About XML as another "dialect": I think it's best to have the report customisation in the database. But as simple data, not XML, not json, not... Pros: less "framework to be learned and mastered". Cons: We have to re-write and migrate all reports.

About hierarchy for scripts: Nice idea! It remains me GNU/Linux/Debian/Ubuntu/Mint/Gnome... each customisation in in the next layer.

About the form designer: I was tempted to improve it, but that would perpetuate the inherited problems that make very difficult to customise the reports (no standard coordinates; unsuited for LTR/RTL languages changes, etc.). It is better to make a new one.

About PrintCustTransPortrait.php and others: We also modified that script (all customers ask for it). It is a nightmare when we have updates of that scripts.

Best regards, Rafael.

2016-10-06 6:57 GMT-06:00 rfthomas <[hidden email]>:
We do modify a few of the PDF forms (as well as several other scripts - we
should get some incorporated into the main trunk as they are of general use)
and for each release we need to back in our changes.  For the past several
releases (only with respect to PDF) there have been no changes in the
information passed and the major libraries (includes), so we are able to
just copy the modified scripts.

PDF generation is generally very fast using the existing software.  We find
that the database code is where the major overhead resides.

Adding XML is forcing another "dialect" to be learned and mastered in order
to make changes.  As we understand it, xml is just a framework that code
must interpret, in the case of weberp such would be done utilizing php code.

We would prefer an execution search hierarchy for scripts, where users would
place customized code into customer directories.  We recognize that there is
a performance penalty for such.  It would also require that changes that
involve database, session, get, or post data incompatibility be documented.

We do agree that the report writer and forms are difficult to use and that
the results are not always as expected.  The form designer is missing
several forms, e.g. Quotation, Packing Slip, and Credit Notes.  We have not
researched the form code.

Is the Sales Invoice form data, i.e. Customer Invoice, actually used in the
code?  We have modified the scripts to enable printing customer invoices,
credit notes and packing slips from PrintCustTransPortrait.php.

Bob Thomas



--
View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Replace-addJpegFromFile-from-R-OS-pdf-php-with-Image-from-tcpdf-php-tp4658687p4658698.html
Sent from the web-ERP-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Web-erp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-developers
Loading...