tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

PDF quality issues with TinyMCE React #452

Closed rutanshuj closed 7 months ago

rutanshuj commented 1 year ago

What is the current behavior?

The current behavior of the PDF feature in TinyMCE is that it allows users to export PDF files from their content, but there have been issues with the quality of the PDFs. As shown in the attached screenshot and file, the exported PDF appears to be of low quality, with significant pixelation of the text. This is in contrast to the clear and readable view of the same text when it is typed in the editor.

Screenshot 2023-04-09 at 10 25 16 PM

export.pdf

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.

Followed the steps mentioned here - https://www.tiny.cloud/docs/tinymce/6/react-cloud/ and added the functionality of export.

  <Editor
        apiKey=''
        onInit={(evt, editor) => editorRef.current = editor}
        initialValue="<p>This is the initial content of the editor.</p>"
        init={{
          content_css: "mycontent.css",
          height: 500,
          menubar: false,
          plugins: [
            'export',
            'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
            'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
            'insertdatetime', 'media', 'table', 'code', 'help', 'wordcount'
          ],
          toolbar: 'export | undo redo | blocks | ' +
            'bold italic forecolor | alignleft aligncenter ' +
            'alignright alignjustify | bullist numlist outdent indent | ' +
            'removeformat | help',
          content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; background-color: white; }',
        }}
      />

What is the expected behavior?

To ensure that the exported PDFs are of a suitable quality for users, it would be beneficial for TinyMCE to include an option to configure the quality of the PDF output. Alternatively, it would be ideal for TinyMCE to automatically produce a higher quality PDF without the need for manual configuration.

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

tinymce-react - 4.3.0

TinyITAdmin commented 1 year ago

Ref: INT-3173

tiny-james commented 1 year ago

This question should be asked on the tinymce repo. The tinymce-react project just loads TinyMCE in react, it does not change the behaviour of the PDF plugin in any way.

danoaky-tiny commented 7 months ago

This is a premium feature, we do not offer premium support via GitHub. If you have a support subscription, you will be better served by our support team who will be able to assist: https://support.tiny.cloud/hc/en-us/requests/new