HotPDF, harici bir PDF runtime kurmadan doğrudan PDF oluşturma ve düzenleme, formlar, notlar, şifreleme, dijital imzalar, Unicode yazı tipleri, standart odaklı çıktı ve preflight raporları gereken Delphi ve C++Builder uygulamaları için yerel bir VCL PDF kütüphanesidir.
Bu yazı teams that must generate protected PDF output without relying on a desktop PDF application için hazırlanmıştır. AES-256 encryption and permission policy konusunu tek bir bileşen çağrısı olarak değil, üretim düzeyinde belge mühendisliği olarak ele alır.
Pratik risk şudur: a password-protected document is not automatically a governed document if permissions, metadata encryption, attachment handling, and password custody are undefined. Bu nedenle akışın yazılı sözleşmeye, gözlemlenebilir tanılara ve gerçekçi regresyon dosyalarına ihtiyacı vardır.
Mimari kararlar
Separate document security from application authentication. owner password custody and rotation policy / user password delivery path and recovery procedure
- owner password custody and rotation policy
- user password delivery path and recovery procedure
- print, copy, accessibility, annotation, and form-fill permissions
- whether metadata, embedded files, and attachments must also be protected
Uygulama akışı
Define the encryption profile before writing content. Aşağıdaki sıra, iş akışını Delphi ve C++Builder ekipleri için incelenebilir tutar.
- select an encryption profile from application policy rather than UI text
- validate that the requested permissions match the customer agreement
- write the document to a controlled temporary location before distribution
- open the output with a target viewer and verify the permissions dialog
- log password policy identifiers without logging secret values
Doğrulama kanıtı
What a security audit should record. Bu alanları çıktı veya destek kaydıyla birlikte saklayın.
- encryption algorithm, permission bitmask, metadata policy, and attachment policy
- profile version, operator identity, output hash, and distribution channel
- viewer compatibility result for the supported customer environments
- redacted failure reason when password generation or protected save fails
Permissions, metadata, and viewer compatibility
AES-256 output should be treated as a named policy. The policy controls owner and user passwords, print and copy permissions, metadata visibility, and compatibility expectations for the viewers that will open the file.
Support package design
Once HotPDF Component is deployed, the most valuable support package is the one that explains the input, profile, output, and exact stage that failed.
- encryption algorithm, permission bitmask, metadata policy, and attachment policy
- profile version, operator identity, output hash, and distribution channel
- viewer compatibility result for the supported customer environments
- redacted failure reason when password generation or protected save fails
- terminology snapshot: AES-256, owner password, user password, permissions
Mühendislik inceleme notları: AES-256 encryption and permission policy
Özelliğin bir demoyu aşıp sürüm, destek ve müşteri eskalasyonu sırasında savunulabilir olduğunu doğrulamak için bu inceleme notlarını kullanın.
- Karar: owner password custody and rotation policy. Uygulama baskı noktası: validate that the requested permissions match the customer agreement. Kabul kanıtı: viewer compatibility result for the supported customer environments. Regresyon tetikleyicisi: encrypted attachments need the same retention and access policy as the main file
- Karar: user password delivery path and recovery procedure. Uygulama baskı noktası: write the document to a controlled temporary location before distribution. Kabul kanıtı: redacted failure reason when password generation or protected save fails. Regresyon tetikleyicisi: legacy viewers may open a file but ignore or misreport newer permission flags
- Karar: print, copy, accessibility, annotation, and form-fill permissions. Uygulama baskı noktası: open the output with a target viewer and verify the permissions dialog. Kabul kanıtı: encryption algorithm, permission bitmask, metadata policy, and attachment policy. Regresyon tetikleyicisi: metadata can leak business information if encryption settings omit it
Sınır durumları
- legacy viewers may open a file but ignore or misreport newer permission flags
- metadata can leak business information if encryption settings omit it
- support logs must never include owner passwords, user passwords, or password hints
- encrypted attachments need the same retention and access policy as the main file
Delphi / C++Builder notes
HotPDF Component should sit behind a small service boundary that receives files, streams, profiles, and credentials, then returns output paths, warnings, metrics, and validation status. Important terms include AES-256, owner password, user password, permissions, encrypted metadata, protected save.
Delphi kod örneği
Aşağıdaki Delphi taslağı bu konu için pratik bir servis sınırını gösterir. Politika kontrollerini, günlüklemeyi ve doğrulamayı dar ürün çağrısı bölümünün dışında tutarak akışı test edilebilir bırakın.
procedure SaveProtectedPdf(const OutputFile: string; const Profile: TPdfSecurityProfile);
var
Pdf: THotPDF;
begin
Pdf := THotPDF.Create(nil);
try
Pdf.FileName := OutputFile;
Pdf.BeginDoc;
WriteDocumentBody(Pdf);
ApplyEncryptionProfile(Pdf, Profile);
Pdf.EndDoc;
VerifyPermissions(OutputFile, Profile.ExpectedPermissions);
finally
Pdf.Free;
end;
end;
Üretim kontrol listesi
- İş akışını boş bir dosyada, normal bir müşteri dosyasında ve en kötü durum dosyasında çalıştırın
- Oluşturulan PDF'yi hedef görüntüleyici, doğrulayıcı, yazıcı veya aşağı akış uygulamasıyla açın
- Ürün sürümünü, profil sürümünü, giriş karmasını, çıktı yolunu, geçen süreyi ve uyarı sayısını kaydedin
- Parolaları, sertifikaları, geçici dosyaları ve müşteri verilerini açık saklama kuralları altında tutun
- Bir müşteri dosyası yeni bir uç durum ortaya çıkardığında regresyon belgeleri ekleyin
Ürün belgeleri
Ek kod örnekleri
Pdf.ActivateProtection := True;
Pdf.CryptKeyLength := aes256;
Pdf.UserPassword := ''; // anyone can open the file
Pdf.OwnerPassword := 'rotate-me-quarterly'; // guards the permission set
Pdf.ProtectOptions := [prPrint, prPrint12bit, prExtractContent];
Pdf.BeginDoc;
// ... page content ...
Pdf.EndDoc;var
Pdf: THotPDF;
PageCount: Integer;
begin
Pdf := THotPDF.Create(nil);
try
PageCount := Pdf.LoadFromFile('encrypted.pdf', 'open-secret');
if PageCount > 0 then
begin
Pdf.ActivateProtection := False; // drop encryption on save
Pdf.SaveLoadedDocument('plain.pdf');
end;
finally
Pdf.Free;
end;
end;