View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037912 | FPC | Packages | public | 2020-10-12 00:03 | 2020-10-21 08:07 |
Reporter | Ruben | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0037912: FCL-PDF images not displayed correctly | ||||
Description | Images are not rendered correctly | ||||
Steps To Reproduce | function Timage2PDF.convert(bitmap:Tstream): TMemoryStream; var PDF:TPDFDocument; PDFopts:TPDFOptions; P:TPDFpage; S:TPDFsection; IDX,W,H:integer; TS:TMemoryStream; UnitOfMeasure: TPDFUnitOfMeasure; begin PDF:=TPDFDocument.create(nil); PDF.infos.Title:='test'; PDFopts:=[poPageOriginAtTop]; PDF.StartDocument; S:=PDF.Sections.AddSection; P:=PDF.Pages.AddPage; P.PaperType:= ptA4 ; P.UnitOfMeasure:=uomPixels; //IDX:=PDF.images.AddFromFile('qr.bmp'); IDX:=PDF.images.Addfromstream(bitmap, TFPReaderBMP, false); W:=PDF.Images[IDX].Width; H:=PDF.Images[IDX].Height; P.DrawImageRawSize(0,P.GetPaperHeight - H,W,H,IDX); S.Addpage(P); TS:=MemoryStream.create; PDF.SaveToStream(TS); Result:=TS; End | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
|
|
FCL-PDF belongs to FPC project. Moving. |
|
1st - there is no complete code example 2nd - the PDF document creation initialized in such a manner: D:=TPdfDocument.Create(nil); D.Infos.ApplicationName := ApplicationName; D.Infos.CreationDate := Now; D.Infos.KeyWords:='some keywords'; D.Options := [poPageOriginAtTop{,poSubsetFont},poCompressFonts,poCompressImages,poUseImageTransparency,poUTF16Info]; PDF Options is a property of PDF document, but in proposed by Reporter code snipped they are simply not used. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-12 00:03 | Ruben | New Issue | |
2020-10-12 00:03 | Ruben | File Added: download (12).pdf | |
2020-10-21 02:09 | Maxim Ganetsky | Summary | Fcl-pfd images not displayed correctly => FCL-PDF images not displayed correctly |
2020-10-21 02:09 | Maxim Ganetsky | Steps to Reproduce Updated | View Revisions |
2020-10-21 02:09 | Maxim Ganetsky | LazTarget | => - |
2020-10-21 02:09 | Maxim Ganetsky | Note Added: 0126437 | |
2020-10-21 02:10 | Maxim Ganetsky | Project | Packages => FPC |
2020-10-21 08:07 | Anton Kavalenka | Note Added: 0126438 |