You are not logged in.
Pages: 1
I have a stack overflow error when saving when I try to encrypt a pdf.
The error appears in TPdfRawText.InternalWriteTo
Here is my code :
p := TMemoryStream.Create;
Pdf := TPdfDocumentGDI.Create(false, 0, false, TPdfEncryption.New(elRC4_40, '1234', '1234', [epPrinting]));
Pdf.GeneratePDF15File := True;
Pdf.PDFA1 := False;
Pdf.Info.Title := 'Title';
Pdf.Info.Author := 'Author';
Pdf.Info.Creator := 'Creator';
try
for i := 1 to QuickReport.QRPrinter.PageCount do
begin
aMeta := QuickReport.QRPrinter.GetPage(i);
try
Pdf.DefaultPageWidth := MulDiv(aMeta.Width,72,Pdf.ScreenLogPixels);
Pdf.DefaultPageHeight := MulDiv(aMeta.Height,72,Pdf.ScreenLogPixels);
Pdf.AddPage;
Pdf.Canvas.RenderMetaFile(aMeta,1,0,0,0, tpSetTextJustification,99,101,tcNeverClip);
finally
aMeta.Free;
end;
end;
Pdf.SaveToStream(p); <<--- Error appears here
finally
FreeAndNil(Pdf);
FreeAndNil(p);
end;
You could do it this way :
fPDF := TPdfDocumentGDI.Create;
{Create some PDF content}
fPDF.SaveToFile('file1.pdf');
CopyFile('file1.pdf', 'file2.pdf', false);
Hello,
Reviving this old post.
I have found source code for CCITT and JBIG2 on Github : https://github.com/Artogn/llPDFLib
I don't know if this can help you...
kind regards,
Frederic
Hello,
Is there a way to have a monochrome bitmap or the VCLCanvas compressed with CCITT G4 or JBIG2 ?
Kind regards
Frederic
Hello,
I have installed latest version (2017-01-18) from GitHub.
I try to generate a PDF/A-1a file of 2 pages report from QuickReport 4 like this :
Pdf := TPdfDocumentGDI.Create;
Pdf.GeneratePDF15File := False;
Pdf.PDFA1 := True;
Pdf.Info.Title := PrintName;
Pdf.Info.Author := UserName;
Pdf.Info.Creator := CompanyName;
try
for i := 1 to QRPreview.QRPrinter.PageCount do
begin
aMeta := QRPreview.QRPrinter.GetPage(i);
try
Pdf.DefaultPageWidth := MulDiv(aMeta.Width,72,Pdf.ScreenLogPixels);
Pdf.DefaultPageHeight := MulDiv(aMeta.Height,72,Pdf.ScreenLogPixels);
Pdf.AddPage;
Pdf.Canvas.RenderMetaFile(aMeta,1,0,0,0, tpKerningFromAveragePosition);
finally
aMeta.Free;
end;
end;
if SaveDialog.Execute then
Pdf.SaveToFile(SaveDialog.FileName);
finally
Pdf.Free;
end;
The report consists of two b&w 200dpi scanned images on two pages.
When trying to validate the file with PDF Tools Online (https://www.pdf-online.com/osa/validate.aspx).
I get this result :
File Test.pdf
Compliance pdfa-1a
Result Document does not conform to PDF/A.
Details
Validating file "Test.pdf" for conformance level pdfa-1a
The key Type is required but missing.
The document does not conform to the requested standard.
The document doesn't provide appropriate logical structure information.
Done.
Hello,
Is there a way to support the Zip or deflate compression method with Tiff images ?
Kind regards
Frederic
I have the same problem with one report from QuickReport (3.6.2 pro). check boxes are not displayed, some grid lines are missing and some header text is scrambled.
EmfExplorer displays the saved emf page correctly, with one exception : when GDI+ is enabled one grid is not correctly positioned.
This problem does not occure when saved with SynPdf...
I can send you the file by email if you want.
Kind regards,
Frederic
Pages: 1