Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2023-05-01 14:05:46 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f95a331ba34eacee559e4be4f60eda30bc24343
2f95a331
1 parent
b0b5c979
Move libraryName
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
pdf/lib/src/pdf/format/xref.dart
pdf/lib/src/pdf/obj/info.dart
pdf/lib/src/pdf/format/xref.dart
View file @
2f95a33
...
...
@@ -101,6 +101,8 @@ class PdfXrefTable extends PdfDataType with PdfDiagnostic {
final
int
lastObjectId
;
static
const
String
libraryName
=
'https://github.com/DavBfr/dart_pdf'
;
/// Writes a block of references to the Pdf file
void
_writeBlock
(
PdfStream
s
,
int
firstId
,
List
<
PdfXref
>
block
)
{
s
.
putString
(
'
$firstId
${block.length}
\n
'
);
...
...
@@ -125,13 +127,16 @@ class PdfXrefTable extends PdfDataType with PdfDiagnostic {
s
.
putString
(
'%PDF-
$v
\n
'
);
s
.
putBytes
(
const
<
int
>[
0x25
,
0xC2
,
0xA5
,
0xC2
,
0xB1
,
0xC3
,
0xAB
,
0x0A
]);
s
.
putComment
(
libraryName
);
assert
(()
{
if
(
o
.
settings
.
verbose
)
{
setInsertion
(
s
);
setInsertion
(
s
,
350
);
startStopwatch
();
debugFill
(
'Verbose dart_pdf'
);
debugFill
(
'Producer
https://github.com/DavBfr/dart_pdf
'
);
debugFill
(
'Producer
$libraryName
'
);
debugFill
(
'Creation date:
${DateTime.now()}
'
);
debugFill
(
'Compress:
${o.settings.compress}
'
);
debugFill
(
'Crypto:
${o.settings.encryptCallback != null}
'
);
}
return
true
;
}());
...
...
pdf/lib/src/pdf/obj/info.dart
View file @
2f95a33
...
...
@@ -17,6 +17,7 @@
import
'../document.dart'
;
import
'../format/dict.dart'
;
import
'../format/string.dart'
;
import
'../format/xref.dart'
;
import
'object.dart'
;
/// Information object
...
...
@@ -39,15 +40,14 @@ class PdfInfo extends PdfObject<PdfDict> {
if
(
subject
!=
null
)
'/Subject'
:
PdfString
.
fromString
(
subject
),
if
(
keywords
!=
null
)
'/Keywords'
:
PdfString
.
fromString
(
keywords
),
if
(
producer
!=
null
)
'/Producer'
:
PdfString
.
fromString
(
'
$producer
(
$_libraryName
)'
)
'/Producer'
:
PdfString
.
fromString
(
'
$producer
(
${PdfXrefTable.libraryName}
)'
)
else
'/Producer'
:
PdfString
.
fromString
(
_
libraryName
),
'/Producer'
:
PdfString
.
fromString
(
PdfXrefTable
.
libraryName
),
'/CreationDate'
:
PdfString
.
fromDate
(
DateTime
.
now
()),
}),
);
static
const
String
_libraryName
=
'https://github.com/DavBfr/dart_pdf'
;
/// Author of this document
final
String
?
author
;
...
...
Please
register
or
login
to post a comment