Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailer: ID is not space-separated. #442

Open
RenderMichael opened this issue May 22, 2024 · 1 comment · May be fixed by #443
Open

Trailer: ID is not space-separated. #442

RenderMichael opened this issue May 22, 2024 · 1 comment · May be fixed by #443

Comments

@RenderMichael
Copy link
Contributor

Reproduction:

public static string GenerateNewPdf()
{
    string path = $"outputs/Generated--{NewGuid():N}.pdf";
    using var document = new PdfDocument();
    PdfPage page = document.AddPage();
    document.Save(path);
    return Path.GetFullPath(path);
}

Outputs:

The trailer contains the line:

/ID[<FCEAE9E3BEA9864C83AA492B76687F02><FCEAE9E3BEA9864C83AA492B76687F02>]

There should be a space inserted.

Full file output
%PDF-1.4
%����
1 0 obj
<<
/CreationDate(D:20240522141508-04'00')
/Creator<FEFF0050004400460073006800610072007000200031002E00350030002E0034003000300030002D006E00650074007300740061
006E00640061007200640020002800680074007400700073003A002F002F006700690074006800750062002E0063006F
006D002F007300740073007400650069006700650072002F005000640066005300680061007200700043006F00720065
0029>
/Producer(PDFsharp 1.50.4000-netstandard \(https://github.com/ststeiger/PdfSharpCore\))
>>
endobj
2 0 obj
<<
/Type/Catalog
/Pages 3 0 R
>>
endobj
3 0 obj
<<
/Type/Pages
/Count 1
/Kids[4 0 R]
>>
endobj
4 0 obj
<<
/Type/Page
/MediaBox[0 0 612 792]
/Parent 3 0 R
/Group
<<
/CS/DeviceRGB
/S/Transparency
>>
>>
endobj
xref
0 5
0000000000 65535 f 
0000000015 00000 n 
0000000477 00000 n 
0000000525 00000 n 
0000000580 00000 n 
trailer
<<
/ID[<FCEAE9E3BEA9864C83AA492B76687F02><FCEAE9E3BEA9864C83AA492B76687F02>]
/Info 1 0 R
/Root 2 0 R
/Size 5
>>
startxref
692
%%EOF

@RenderMichael
Copy link
Contributor Author

I cloned the repo to try and debug through it, and found out this only happens in Release mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant