使用Electron PDF

时间:2018-12-06 21:28:14

标签: pdf

我有一个项目,我在其中使用Electron PDF从HTML生成PDF文件,然后将其发送给外部局,由其打印并发送给客户。

现在,他们已经向我发送了他们想要的PDF文件中的标头,我想知道如何将这些PDF标头编码到我的最终文件中。我很少使用PDF。

他们发送给我的文件(称为joboptions)包含以下信息:

    <<
  /ASCII85EncodePages false
  /AllowPSXObjects false
  /AllowTransparency true
  /AlwaysEmbed [
    true
  ]
  /AntiAliasColorImages false
  /AntiAliasGrayImages false
  /AntiAliasMonoImages false
  /AutoFilterColorImages true
  /AutoFilterGrayImages true
  /AutoPositionEPSFiles true
  /AutoRotatePages /None
  /Binding /Left
  /CalCMYKProfile (None)
  /CalGrayProfile (Dot Gain 20%)
  /CalRGBProfile (Adobe RGB \0501998\051)
  /CannotEmbedFontPolicy /Warning
  /CheckCompliance [
    /None
  ]
  /ColorACSImageDict <<
    /HSamples [
      1
      1
      1
      1
    ]
    /QFactor 0.15000
    /VSamples [
      1
      1
      1
      1
    ]
  >>
  /ColorConversionStrategy /UseDeviceIndependentColor
  /ColorImageAutoFilterStrategy /JPEG
  /ColorImageDepth -1
  /ColorImageDict <<
    /HSamples [
      1
      1
      1
      1
    ]
    /QFactor 0.15000
    /VSamples [
      1
      1
      1
      1
    ]
  >>
  /ColorImageDownsampleThreshold 1.50000
  /ColorImageDownsampleType /Bicubic
  /ColorImageFilter /DCTEncode
  /ColorImageMinDownsampleDepth 1
  /ColorImageMinResolution 300
  /ColorImageMinResolutionPolicy /OK
  /ColorImageResolution 300
  /ColorSettingsFile ()
  /CompatibilityLevel 1.4
  /CompressObjects /Tags
  /CompressPages true
  /ConvertImagesToIndexed true
  /CreateJDFFile false
  /CreateJobTicket false
  /CropColorImages false
  /CropGrayImages false
  /CropMonoImages false
  /DSCReportingLevel 0
  /DefaultRenderingIntent /Default
  /Description <<
    /SVE <FFFE5B00420061007300650072006100640020007000E5002000270061006C006600720065006400730073006F006E0073002000320030003100350027005D0020005B00420061007300650072006100640020007000E500200027005B005000440046002F0058002D0034003A0032003000300038005D0027005D00200041006E007600E4006E00640020006400650020006800E4007200200069006E0073007400E4006C006C006E0069006E006700610072006E00610020006F006D002000640075002000760069006C006C00200073006B006100700061002000410064006F006200650020005000440046002D0064006F006B0075006D0065006E007400200073006F006D00200073006B00610020006B006F006E00740072006F006C006C006500720061007300200065006C006C0065007200200073006F006D0020006D00E50073007400650020006D006F0074007300760061007200610020005000440046002F0058002D0034003A0032003000300038002C00200065006E002000490053004F002D007300740061006E00640061007200640020006600F6007200200075007400620079007400650020006100760020006700720061006600690073006B007400200069006E006E0065006800E5006C006C002E00200020004D0065007200200069006E0066006F0072006D006100740069006F006E0020006F006D00200068007500720020006D0061006E00200073006B00610070006100720020005000440046002F0058002D0034002D006B006F006D00700061007400690062006C00610020005000440046002D0064006F006B0075006D0065006E0074002000660069006E006E00730020006900200061006E007600E4006E00640061007200680061006E00640062006F006B0065006E002000740069006C006C0020004100630072006F006200610074002E002000200053006B006100700061006400650020005000440046002D0064006F006B0075006D0065006E00740020006B0061006E002000F600700070006E00610073002000690020004100630072006F0062006100740020006F00630068002000410064006F00620065002000520065006100640065007200200035002E00300020006F00630068002000730065006E006100720065002E00>
  >>
  /DetectBlends true
  /DetectCurves 0
  /DoThumbnails false
  /DownsampleColorImages true
  /DownsampleGrayImages true
  /DownsampleMonoImages true
  /EmbedAllFonts true
  /EmbedJobOptions true
  /EmbedOpenType false
  /EmitDSCWarnings false
  /EncodeColorImages true
  /EncodeGrayImages true
  /EncodeMonoImages true
  /EndPage -1
  /GrayACSImageDict <<
    /HSamples [
      1
      1
      1
      1
    ]
    /QFactor 0.15000
    /VSamples [
      1
      1
      1
      1
    ]
  >>
  /GrayImageAutoFilterStrategy /JPEG
  /GrayImageDepth -1
  /GrayImageDict <<
    /HSamples [
      1
      1
      1
      1
    ]
    /QFactor 0.15000
    /VSamples [
      1
      1
      1
      1
    ]
  >>
  /GrayImageDownsampleThreshold 1.50000
  /GrayImageDownsampleType /Bicubic
  /GrayImageFilter /DCTEncode
  /GrayImageMinDownsampleDepth 2
  /GrayImageMinResolution 300
  /GrayImageMinResolutionPolicy /OK
  /GrayImageResolution 300
  /ImageMemory 1048576
  /JPEG2000ColorACSImageDict <<
    /Quality 30
    /TileHeight 256
    /TileWidth 256
  >>
  /JPEG2000ColorImageDict <<
    /Quality 30
    /TileHeight 256
    /TileWidth 256
  >>
  /JPEG2000GrayACSImageDict <<
    /Quality 30
    /TileHeight 256
    /TileWidth 256
  >>
  /JPEG2000GrayImageDict <<
    /Quality 30
    /TileHeight 256
    /TileWidth 256
  >>
  /LockDistillerParams false
  /MaxSubsetPct 100
  /MonoImageDepth -1
  /MonoImageDict <<
    /K -1
  >>
  /MonoImageDownsampleThreshold 1.50000
  /MonoImageDownsampleType /Bicubic
  /MonoImageFilter /CCITTFaxEncode
  /MonoImageMinResolution 1200
  /MonoImageMinResolutionPolicy /OK
  /MonoImageResolution 1200
  /Namespace [
    (Adobe)
    (Common)
    (1.0)
  ]
  /NeverEmbed [
    true
  ]
  /OPM 1
  /Optimize false
  /OtherNamespaces [
    <<
      /AsReaderSpreads false
      /CropImagesToFrames true
      /ErrorControl /WarnAndContinue
      /FlattenerIgnoreSpreadOverrides false
      /IncludeGuidesGrids false
      /IncludeNonPrinting false
      /IncludeSlug false
      /Namespace [
        (Adobe)
        (InDesign)
        (4.0)
      ]
      /OmitPlacedBitmaps false
      /OmitPlacedEPS false
      /OmitPlacedPDF false
      /SimulateOverprint /Legacy
    >>
    <<
      /AddBleedMarks false
      /AddColorBars false
      /AddCropMarks true
      /AddPageInfo false
      /AddRegMarks false
      /BleedOffset [
        8.50394
        8.50394
        8.50394
        8.50394
      ]
      /ConvertColors /NoConversion
      /DestinationProfileName ()
      /DestinationProfileSelector /NA
      /Downsample16BitImages true
      /FlattenerPreset <<
        /PresetSelector /HighResolution
      >>
      /FormElements false
      /GenerateStructure false
      /IncludeBookmarks false
      /IncludeHyperlinks false
      /IncludeInteractive false
      /IncludeLayers false
      /IncludeProfiles true
      /MarksOffset 6
      /MarksWeight 0.25000
      /MultimediaHandling /UseObjectSettings
      /Namespace [
        (Adobe)
        (CreativeSuite)
        (2.0)
      ]
      /PDFXOutputIntentProfileSelector /DocumentCMYK
      /PageMarksFile /RomanDefault
      /PreserveEditing true
      /UntaggedCMYKHandling /LeaveUntagged
      /UntaggedRGBHandling /UseDocumentProfile
      /UseDocumentBleed false
    >>
    <<
      /AllowImageBreaks true
      /AllowTableBreaks true
      /ExpandPage false
      /HonorBaseURL true
      /HonorRolloverEffect false
      /IgnoreHTMLPageBreaks false
      /IncludeHeaderFooter false
      /MarginOffset [
        0
        0
        0
        0
      ]
      /MetadataAuthor ()
      /MetadataKeywords ()
      /MetadataSubject ()
      /MetadataTitle ()
      /MetricPageSize [
        0
        0
      ]
      /MetricUnit /inch
      /MobileCompatible 0
      /Namespace [
        (Adobe)
        (GoLive)
        (8.0)
      ]
      /OpenZoomToHTMLFontSize false
      /PageOrientation /Portrait
      /RemoveBackground false
      /ShrinkContent true
      /TreatColorsAs /MainMonitorColors
      /UseEmbeddedProfiles false
      /UseHTMLTitleAsMetadata true
    >>
  ]
  /PDFX1aCheck false
  /PDFX3Check false
  /PDFXBleedBoxToTrimBoxOffset [
    0
    0
    0
    0
  ]
  /PDFXCompliantPDFOnly true
  /PDFXNoTrimBoxError false
  /PDFXOutputCondition ()
  /PDFXOutputConditionIdentifier (FOGRA27)
  /PDFXOutputIntentProfile (Coated FOGRA27 \050ISO 12647-2:2004\051)
  /PDFXRegistryName (http://www.color.org)
  /PDFXSetBleedBoxToMediaBox true
  /PDFXTrapped /False
  /PDFXTrimBoxToMediaBoxOffset [
    0
    0
    0
    0
  ]
  /ParseDSCComments true
  /ParseDSCCommentsForDocInfo true
  /ParseICCProfilesInComments true
  /PassThroughJPEGImages true
  /PreserveCopyPage true
  /PreserveDICMYKValues true
  /PreserveEPSInfo true
  /PreserveFlatness false
  /PreserveHalftoneInfo false
  /PreserveOPIComments false
  /PreserveOverprintSettings true
  /StartPage 1
  /SubsetFonts true
  /TransferFunctionInfo /Apply
  /UCRandBGInfo /Remove
  /UsePrologue false
  /sRGBProfile (sRGB IEC61966-2.1)
>> setdistillerparams
<<
  /HWResolution [2400 2400]
  /PageSize [612.000 792.000]
>> setpagedevice

如何将这些信息编码到我的最终PDF文件中?

感谢您的时间。

2 个答案:

答案 0 :(得分:1)

joboptions文件包含有关构建PDF文件的说明。它通常在Adobe应用程序中使用,并且在选择将文件导出为PDF时会作为选项加载。我对电子PDF一无所知,但是除非您可以使用joboptions文件生成PDF(我对此表示怀疑),否则您将碰壁。

答案 1 :(得分:0)

joboptions配置文件是由Adobe Distiller应用程序生成的用于生成pdf的存储设置文件。因此,您应该在最终计算机上安装Adobe Destiller,或者只是尝试在用于匹配这些选项的pdf软件包中设置选项。