amici-infotech/craft-super-pdf

Any option to save PDF as a Craft Asset (instead of in storage)?

Closed this issue · 13 comments

Is there any option to save PDF as a Craft Asset (instead of in storage)? It looks like no. But it would be great if that were possible, or if there were an event we could hook into to do so ourselves. Possible? Any plans to add this?

@twosixcode Yes, We do have plan for this. Future updates will include:

  • Allow user to add file in email as attachment.
  • Save download/view count with metadata.
  • Few frontend tags to help user to fetch old files (so no need to create new file each time)
  • Save file to assets with override option.
  • Few events to allow user to do further customizations.

I guess I can prioritize save into craft assets for ya. You can consider it coming by end of next week. Will keep you updated.

That would be fantastic!

Are you still looking at adding Assets support this week? I'm available for testing at any time!

Hey @twosixcode Just pushed v1.0.8 for CRAFT 3. Craft 4 release may take 3-4 days. You can review features on craft 3. i am looking forward for the reviews.

Thanks! Just tested. I would expect the "Override" option to overwrite the existing Asset. But it does not do so. In fact, it seems to be the same as "Ignore." If change the HTML used for the PDF, the PDF that is saved to Assets does not reflect the change (it is not updated). It is only if I choose the "Duplicate" option that I see the PDF content updated (because it is a new file).

In my case I can dodge any issue here by versioning the filename I use for the PDF with a timestamp using the last edit date. But wanted to mention/get clarification.

Hey. Strange. Override option does override the asset. Versioning pdf with current time is just as it was before.

Can you share your config settings.? Will fix it.

    edition: standard
    enabled: true
    licenseKey: 
    schemaVersion: 1.0.8
    settings:
      add: false
      adminPassword: ''
      chroot: null
      compress: true
      copy: false
      debugCss: false
      debugKeepTemp: false
      debugLayout: false
      debugLayoutBlocks: true
      debugLayoutInline: true
      debugLayoutLines: true
      debugLayoutPaddingBox: true
      debugPng: false
      defaultFont: arial
      defaultMediaType: screen
      defaultPaperOrientation: portrait
      defaultPaperSize: A4
      dpi: 96
      encrypt: false
      filename: pdf
      folder: pdf
      fontCache: null
      fontDir: null
      fontHeightRatio: 1.1
      forceDownload: false
      hasCpSection: ''
      isFontSubsettingEnabled: true
      isHtml5ParserEnabled: true
      isJavascriptEnabled: true
      isPhpEnabled: false
      isRemoteEnabled: true
      logOutputFile: null
      modify: false
      password: password
      pdfBackend: CPDF
      pdflibLicense: ''
      pluginName: 'Super PDF'
      print: false
      resaveBehaviour: override
      rootDir: null
      tempDir: null
      type: render
      volume: blog

@twosixcode Found the bug. Just pushed v1.0.8.1 with the fix. Thanks so much for diving into it.

This features is just what I am looking for! Any chance the Craft4 update will come this week?

@Havnevik Craft 4 is under progress. It will come next week.

@Havnevik Craft 4 is under progress. It will come next week.

Hi, is the craft 4 update far off? I am closing in on the production deadline for my project.

@Havnevik Yes. With v2.0.2 its upgraded fully.

@Havnevik Yes. With v2.0.2 its upgraded fully.

@amici-infotech I'm sorry. It appears I might have misplace my head somewhere in the sprint to the finish line on my ongoing project. Thank you, this is perfect!