Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.exporter

public Class EmbeddedBibFilePdfExporter

extends Exporter
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .StringWriter, java.nio.charset.StandardCharsets, java.nio.file.Files, .Path, java.util.HashMap, .List, .Map, org.jabref.logic.bibtex.BibEntryWriter, .FieldPreferences, .FieldWriter, org.jabref.logic.l10n.Localization, org.jabref.logic.os.OS, org.jabref.logic.util.StandardFileType, org.jabref.logic.util.io.FileUtil, org.jabref.model.database.BibDatabaseContext, .BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDDocumentNameDictionary, .PDEmbeddedFilesNameTreeNode, .PDPage, .PDPageContentStream, org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification, .PDEmbeddedFile, org.apache.pdfbox.pdmodel.font.PDType1Font, .Standard14Fonts, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

A custom exporter to write bib entries to an embedded bib file.

Field Summary

Modifier and TypeField and Description
private final BibDatabaseMode
private final BibEntryTypesManager
public static String
private final FieldPreferences
private static final Logger

Constructor Summary

AccessConstructor and Description
public
EmbeddedBibFilePdfExporter(BibDatabaseMode bibDatabaseMode, BibEntryTypesManager bibEntryTypesManager, FieldPreferences fieldPreferences)

Method Summary

Modifier and TypeMethod and Description
private void
public void
export(@NonNull BibDatabaseContext
the database to export from
databaseContext
,
@NonNull Path
the file to write to. If it contains "split", then the output is split into different files
file
,
@NonNull List<BibEntry>
a list containing all entries that should be exported
entries
)

private String
Inherited from org.jabref.logic.exporter.Exporter:
exportexportexportToAllFilesOfEntryexportToFileByPathgetFileTypegetIdgetNametoString

Field Detail

bibDatabaseModeback to summary
private final BibDatabaseMode bibDatabaseMode
bibEntryTypesManagerback to summary
private final BibEntryTypesManager bibEntryTypesManager
EMBEDDED_FILE_NAMEback to summary
public static String EMBEDDED_FILE_NAME
fieldPreferencesback to summary
private final FieldPreferences fieldPreferences
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

EmbeddedBibFilePdfExporterback to summary
public EmbeddedBibFilePdfExporter(BibDatabaseMode bibDatabaseMode, BibEntryTypesManager bibEntryTypesManager, FieldPreferences fieldPreferences)

Method Detail

embedBibTexback to summary
private void embedBibTex(String bibTeX, Path path) throws IOException

Similar method: org.jabref.logic.xmp.XmpUtilWriter#writeXmp(Path, BibEntry, org.jabref.model.database.BibDatabase)

exportback to summary
public void export(@NonNull BibDatabaseContext databaseContext, @NonNull Path file, @NonNull List<BibEntry> entries) throws IOException
Parameters
databaseContext:@NonNull BibDatabaseContext

the database to export from

file:@NonNull Path

the file to write to. If it contains "split", then the output is split into different files

entries:@NonNull List<BibEntry>

a list containing all entries that should be exported

Annotations
@Override
getBibStringback to summary
private String getBibString(List<BibEntry> entries) throws IOException