report pro pdf

This forum is meant for anything you would like to share with other visitors
Post Reply
ohernandez@sistemas-liasa.com
Posts: 28
Joined: Tue Nov 17, 2015 4:12 pm

report pro pdf

Post by ohernandez@sistemas-liasa.com »

Hi,
Using a report with Arial font, the pdf embebed "Arial boldMT" and the pdf looks different than the printed document. Because I am documenting the operation I want the pdf document to be identical to the preview or printed document.
I try to include Arial, Arial Normal (Spanish), Arial Normal; but no success.
Any ideas?

Thanks

Oscar Hernandez
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

report pro pdf

Post by robert »

Oscar,

Which ReportPro ? Rp2 or Rp3, and for VO or Vulcan ?

Rp2 uses a PDF engine that I have written myself, so "everything" is possible there.
RP3 uses the WPDFControl. That will be more difficult to change.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ohernandez@sistemas-liasa.com
Posts: 28
Joined: Tue Nov 17, 2015 4:12 pm

report pro pdf

Post by ohernandez@sistemas-liasa.com »

Robert,
I am using Rp2 with Vo.
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

report pro pdf

Post by robert »

Oscar,

- Which version of VO
- Which version if ReportPro 2
- Did you buy the ReportPro source code ?
- Can you mail me the report and supporting files ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ohernandez@sistemas-liasa.com
Posts: 28
Joined: Tue Nov 17, 2015 4:12 pm

report pro pdf

Post by ohernandez@sistemas-liasa.com »

VO 2.8 sp4b
Rp 2.17 (June 2012)
Yes I have the source for RP2.
The report is made by code.

This is the part of the code related.
please observe the line:
oPrinter:Letrero(yy, MargenXL, gfont, 9, FALSE, MemoLine(obser, nLineLength, linobs, 4, true))
is sending "Arial" I tried several forms.

...

IF !self:oObserv:EoF
obser:= AllTrim(self:oObserv:FIELDGET(#OBSERVACIO))
nLineLength := 109
nLines := MLCount(obser, nLineLength, 4, true)
if INICIOJ + (self:Incremento * 2) >= 7.5
return PRINT_OK
endif
yy:=INICIOJ
oPrinter:DrawRectangle(yy, MargenXL, yy+self:Incremento, MARGENXR) // Recuadro
// Recuadro del titulo
oPrinter:DrawRectangle(yy, MargenXL, yy+self:Incremento, MARGENXR,,,,HS_SOLID, self:OGRIS)
oPrinter:LetreroCentrado(gfont, 9, true, yy,MargenXL, "OBSERVACIONES", self:Incremento, 7.87,ALIGN_CENTER)
yy+= (self:Incremento * 2)
FOR linobs:= linobs upto nLines
oPrinter:Letrero(yy, MargenXL, gfont, 9, FALSE, MemoLine(obser, nLineLength, linobs, 4, true))
if yy + self:Incremento < 7.5
yy += self:Incremento ELSE
exit
endif
NEXT
oPrinter:DrawRectangle(yy, MargenXL, INICIOJ, MARGENXR)
yy:= yy-INICIOJ
INICIOJ+=yy
IF linobs >= nLines
NIVEL:=13
else
return PRINT_OK
endif
ELSE
NIVEL:= 13
endif

...

METHOD
pdf.pdf
(250 KiB) Downloaded 83 times
print preview.pdf
(72.94 KiB) Downloaded 83 times
(nY,nX,cFont,nFont,lBold,cLetrero,nalignment,OTEXTCOLOR,OBKGNDCOLOR) CLASS RpPrinter

nX+=.04
nY -= .15
SELF:SetFont(cFont,nFont,lBold,FALSE,FALSE)
self:TextOut(nY,nX,cLetrero, nalignment,OTEXTCOLOR,OBKGNDCOLOR)
return nil
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

report pro pdf

Post by robert »

Oscar,

Since you have the source code, we should be fine. I can help you fix the code.
However, with the info that you have given me it is impossible to determine the cause of the problem.

You included a selection of your code, but in my experience the problem is often somewhere else. That is usually why you cannot find it yourself as well.

Also, you included pdf files with a scan. That does not show me what ReportPro has done, I cannot see which fonts were used.

I can understand that you do not want to send your stuff over an open forum. Please send me as much as you can to robert at xsharp dot eu.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ohernandez@sistemas-liasa.com
Posts: 28
Joined: Tue Nov 17, 2015 4:12 pm

report pro pdf

Post by ohernandez@sistemas-liasa.com »

Thank You Robert,
I will send more info today.
Post Reply