View Issue Details

IDProjectCategoryView StatusLast Update
0026353LazarusLazReportpublic2014-12-06 04:29
ReporterAlonso Cárdenas MárquezAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformamd64, i386OSFreeBSD, WindowsOS Version10 and 8.1
Product Version1.2.4Product Buildqt-amd64, win32 
Target Version1.4Fixed in Version1.3 (SVN) 
Summary0026353: Lazreport and Powerpdf - Problems with justified paragraph
DescriptionSaving report file to pdf doesn't respect when paragraph is justified
Steps To ReproduceI've attached a project file where I have reproduced the problem. Also I have attached a file named report.pdf like example
Additional InformationI can reproduce it on lazarus 1.2.0, 1.2.2 and 1.2.4
TagsNo tags attached.
Fixed in Revision47119
LazTarget1.4
WidgetsetWin32/Win64, QT
Attached Files
  • report2pdf.tar.gz (132,108 bytes)
  • lr_e_pdf.pas.patch (564 bytes)
    Index: source/addons/pdfexport/lr_e_pdf.pas
    ===================================================================
    --- source/addons/pdfexport/lr_e_pdf.pas	(revisi�n: 47079)
    +++ source/addons/pdfexport/lr_e_pdf.pas	(copia de trabajo)
    @@ -484,6 +484,7 @@
                 PRTLabel.FontColor := TfrMemoView_(View).Font.Color;
                 PRTLabel.FontUnderline := fsUnderline in TfrMemoView_(View).Font.Style;
                 PRTLabel.Angle:= (View as TfrMemoView).Angle;
    +            PRTLabel.AlignJustified :=  TfrMemoView_(View).Justify;
             end;
     
         finally
    
    lr_e_pdf.pas.patch (564 bytes)
  • PReport.pas.patch (496 bytes)
    Index: components/powerpdf/PReport.pas
    ===================================================================
    --- components/powerpdf/PReport.pas	(revisi�n: 3821)
    +++ components/powerpdf/PReport.pas	(copia de trabajo)
    @@ -1882,7 +1882,7 @@
             tmpCharSpace := (self.Width - tmpWidth) / (CharCount - 1)
           else
             tmpCharSpace := 0;
    -      if tmpCharSpace > 0 then
    +      if ((tmpCharSpace > 0) AND (tmpCharSpace < 1)) then
             SetCharSpace(tmpCharSpace);
         end
         else
    
    PReport.pas.patch (496 bytes)

Activities

Alonso Cárdenas Márquez

2014-06-18 04:48

reporter  

report2pdf.tar.gz (132,108 bytes)

Alonso Cárdenas Márquez

2014-12-04 01:28

reporter  

lr_e_pdf.pas.patch (564 bytes)
Index: source/addons/pdfexport/lr_e_pdf.pas
===================================================================
--- source/addons/pdfexport/lr_e_pdf.pas	(revisi�n: 47079)
+++ source/addons/pdfexport/lr_e_pdf.pas	(copia de trabajo)
@@ -484,6 +484,7 @@
             PRTLabel.FontColor := TfrMemoView_(View).Font.Color;
             PRTLabel.FontUnderline := fsUnderline in TfrMemoView_(View).Font.Style;
             PRTLabel.Angle:= (View as TfrMemoView).Angle;
+            PRTLabel.AlignJustified :=  TfrMemoView_(View).Justify;
         end;
 
     finally
lr_e_pdf.pas.patch (564 bytes)

Alonso Cárdenas Márquez

2014-12-04 01:28

reporter  

PReport.pas.patch (496 bytes)
Index: components/powerpdf/PReport.pas
===================================================================
--- components/powerpdf/PReport.pas	(revisi�n: 3821)
+++ components/powerpdf/PReport.pas	(copia de trabajo)
@@ -1882,7 +1882,7 @@
         tmpCharSpace := (self.Width - tmpWidth) / (CharCount - 1)
       else
         tmpCharSpace := 0;
-      if tmpCharSpace > 0 then
+      if ((tmpCharSpace > 0) AND (tmpCharSpace < 1)) then
         SetCharSpace(tmpCharSpace);
     end
     else
PReport.pas.patch (496 bytes)

Alonso Cárdenas Márquez

2014-12-04 01:32

reporter   ~0079619

Applying lr_e_pdf.pas.patch and PReport.pas.patch patch files to lazreport and powerpdf could fix the problem with justified paragraph when a report is saved to pdf format.

Jesus Reyes

2014-12-06 04:29

developer   ~0079668

Thanks. As we talked in private email I modified PowerPDF so it justify by resizing spaces insead of all character sizes. It should look better now. The changes in PowerPDF are now available through svn or in PowerPDF 0.9.12 package in Lazarus CCR.

Please test.

Issue History

Date Modified Username Field Change
2014-06-18 04:47 Alonso Cárdenas Márquez New Issue
2014-06-18 04:48 Alonso Cárdenas Márquez File Added: report2pdf.tar.gz
2014-06-20 02:49 Jesus Reyes Assigned To => Jesus Reyes
2014-06-20 02:49 Jesus Reyes Status new => assigned
2014-12-04 01:28 Alonso Cárdenas Márquez File Added: lr_e_pdf.pas.patch
2014-12-04 01:28 Alonso Cárdenas Márquez File Added: PReport.pas.patch
2014-12-04 01:32 Alonso Cárdenas Márquez Note Added: 0079619
2014-12-06 04:29 Jesus Reyes Fixed in Revision => 47119
2014-12-06 04:29 Jesus Reyes LazTarget => 1.4
2014-12-06 04:29 Jesus Reyes Note Added: 0079668
2014-12-06 04:29 Jesus Reyes Status assigned => resolved
2014-12-06 04:29 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-12-06 04:29 Jesus Reyes Resolution open => fixed
2014-12-06 04:29 Jesus Reyes Target Version => 1.4