Here it is. Here is the command I can see under Tools> Preferences> File Handling> Converters, at the PDF to PNG converter: « pdftoppm -r 72 -png -singlefile $$i > $$o » as you said... I’ll try to increase the dpi
ps : On these computer svg from inkscape preview is ok so good point. ----- Mail original ----- | On 1/23/24 04:06, didiergab...@free.fr wrote: | | I am currently in front of my Windows 10 PC at my workplace with | | which I am experiencing exactly the same symptoms. | | | I followed your instructions, and you will find the requested file | | attached. | | | I will do the same thing again this evening at home, with my | | personal | | computer. | | This is plenty good enough. The difference is indeed what converter | is being called. In your case, it looks to be low resolution. I'm | puzzled why this is different on 2.3.7. You could try running the | same test with it. That would tell us. | You could also look under Tools> Preferences> File Handling> | Converters, at the PDF to PNG converter. The command listed there | will be: | pdftoppm -r 72 -png -singlefile $$i > $$o | The -r 72 is controlling resolution. You could try increasing that. | | ps: The Schemacinematic.pdf document was created with inkscape... | | Which I sometimes export to pdf because I cannot activate, in the | | Lyx window, the preview of inkscape documents in the native svg | | format. However, adding an inkscape in float fig document works | | very | | well in pdfLaTex export, so I often do without the preview. Should | | the preview of inkscape svg documents be operational or is it a | | configuration problem / choice of settings that I made incorrectly? | | It should work. Here, the SVG to PNG converter is inkscape itself. | Maybe LyX is not finding it. Again, check the list of converters, | and see if you have anything for SVG. | Riki
18:13:11.027: (dialog-toggle progress) 18:13:35.144: Ouverture du document G:\CPGE\PTSI\DS\DS-2023-2024\DS3\MWE-PDF preview.23.lyx... 18:13:35.225: Document G:\CPGE\PTSI\DS\DS-2023-2024\DS3\MWE-PDF preview.23.lyx ouvert. 18:13:35.225: (file-open: Ctrl+O)Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (391): Recognised Fileformat: latex Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (391): Recognised Fileformat: latex Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (391): Recognised Fileformat: latex Format.cpp (507): will guess format from file extension: lyx -> lyx Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (389): filetools(getFormatFromContents) File type not recognised before EOF! Format.cpp (396): filetools(getFormatFromContents) Couldn't find a known format! LyX: Long string not ended by `EndPreamble' [around line 48 of file ~\AppData\Roaming\LyX2.3\layouts\Mes_listes_CPGE_V2.module current token: 'EndPreamble' context: ''] insets\InsetGraphics.cpp (161): Token: 'filename' insets\InsetGraphics.cpp (161): Token: 'lyxscale' insets\InsetGraphics.cpp (161): Token: 'width' insets\InsetGraphics.cpp (161): Token: '\end_inset' insets\InsetGraphics.cpp (161): Token: 'filename' insets\InsetGraphics.cpp (161): Token: 'width' insets\InsetGraphics.cpp (161): Token: '\end_inset' frontends\qt4\GuiApplication.cpp (257): The image loader can load the following directly: frontends\qt4\GuiApplication.cpp (266): bmp, frontends\qt4\GuiApplication.cpp (266): cur, frontends\qt4\GuiApplication.cpp (266): gif, frontends\qt4\GuiApplication.cpp (266): icns, frontends\qt4\GuiApplication.cpp (266): ico, frontends\qt4\GuiApplication.cpp (266): jpeg, frontends\qt4\GuiApplication.cpp (266): jpg, frontends\qt4\GuiApplication.cpp (266): pbm, frontends\qt4\GuiApplication.cpp (266): pgm, frontends\qt4\GuiApplication.cpp (266): png, frontends\qt4\GuiApplication.cpp (266): ppm, frontends\qt4\GuiApplication.cpp (266): svg, frontends\qt4\GuiApplication.cpp (266): svgz, frontends\qt4\GuiApplication.cpp (266): tif, frontends\qt4\GuiApplication.cpp (266): tiff, frontends\qt4\GuiApplication.cpp (266): wbmp, frontends\qt4\GuiApplication.cpp (266): webp, frontends\qt4\GuiApplication.cpp (266): xbm, frontends\qt4\GuiApplication.cpp (266): xpm, graphics\GraphicsCache.cpp (91): LyX recognises the following image formats: graphics\GraphicsCache.cpp (96): bmp, graphics\GraphicsCache.cpp (96): gif, graphics\GraphicsCache.cpp (96): jpg, graphics\GraphicsCache.cpp (96): pbm, graphics\GraphicsCache.cpp (96): pgm, graphics\GraphicsCache.cpp (96): png, graphics\GraphicsCache.cpp (96): ppm, graphics\GraphicsCache.cpp (96): tiff, graphics\GraphicsCache.cpp (96): xbm, graphics\GraphicsCache.cpp (96): xpm, Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsLoader.cpp (119): LoaderQueue: waking up graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/Param_Pilote.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\Param_Pilote.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsLoader.cpp (93): LoaderQueue: 2 items in the queue graphics\GraphicsCacheItem.cpp (421): Converting it to format. graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/Param_Pilote.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\Param_Pilote.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsConverter.cpp (140): Converter c-tor: doc_fname: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/MWE-PDF preview.23.lyx from_file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/Param_Pilote.pdf to_file_base: C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/CacheItem.iSqSVa from_format: pdf6 to_format: png graphics\GraphicsConverter.cpp (287): build_script ... graphics\GraphicsConverter.cpp (414): ready! graphics\GraphicsConverter.cpp (155): Conversion script: -------------------------------------- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = "G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/Param_Pilote.pdf" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI.pdf" shutil.copy(infile, outfile) os.chdir("C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/") infile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI.pdf" infile_base = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI.eps" outdir = os.path.dirname(outfile) if os.system(r'pdftops -eps -f 1 -l 1 ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) if infile != outfile: unlinkNoThrow(infile) infile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI.eps" infile_base = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertqlHVUI.png" outdir = os.path.dirname(outfile) if os.system(r'magick ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) if infile != outfile: unlinkNoThrow(infile) fromfile = outfile tofile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/CacheItem.iSqSVa.png" try: os.rename(fromfile, tofile) except: try: shutil.copy(fromfile, tofile) except: sys.exit(1) unlinkNoThrow(fromfile) -------------------------------------- support\ForkedCalls.cpp (498): ForkedCallQueue: waking up graphics\GraphicsCacheItem.cpp (421): Converting it to format. graphics\GraphicsCacheItem.cpp (391): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf with displayed filename: G:\CPGE\PTSI\DS\DS-2023-2024\DS3\Docs\SchemaCinematique.pdf Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (398): The file contains pdf6 format data. graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to bmp graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to gif graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to jpg graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pbm graphics\GraphicsCacheItem.cpp (347): Unable to convert from pdf6 to pgm graphics\GraphicsConverter.cpp (140): Converter c-tor: doc_fname: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/MWE-PDF preview.23.lyx from_file: G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf to_file_base: C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/CacheItem.WNgcnn from_format: pdf6 to_format: png graphics\GraphicsConverter.cpp (287): build_script ... graphics\GraphicsConverter.cpp (414): ready! graphics\GraphicsConverter.cpp (155): Conversion script: -------------------------------------- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = "G:/CPGE/PTSI/DS/DS-2023-2024/DS3/Docs/SchemaCinematique.pdf" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT.pdf" shutil.copy(infile, outfile) os.chdir("C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/") infile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT.pdf" infile_base = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT.eps" outdir = os.path.dirname(outfile) if os.system(r'pdftops -eps -f 1 -l 1 ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) if infile != outfile: unlinkNoThrow(infile) infile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT.eps" infile_base = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT" outfile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/gconvertRpZUAT.png" outdir = os.path.dirname(outfile) if os.system(r'magick ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) if infile != outfile: unlinkNoThrow(infile) fromfile = outfile tofile = "C:/Users/Administrateur/AppData/Local/Temp/lyx_tmpdir.aCNxnoPsyadD/CacheItem.WNgcnn.png" try: os.rename(fromfile, tofile) except: try: shutil.copy(fromfile, tofile) except: sys.exit(1) unlinkNoThrow(fromfile) -------------------------------------- graphics\GraphicsLoader.cpp (130): LoaderQueue: I'm going to sleep graphics\GraphicsCacheItem.cpp (272): Image conversion succeeded. Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (301): Loading image. graphics\GraphicsCacheItem.cpp (307): Image loading succeeded. graphics\GraphicsCacheItem.cpp (272): Image conversion succeeded. Format.cpp (391): Recognised Fileformat: pdf6 graphics\GraphicsCacheItem.cpp (301): Loading image. graphics\GraphicsCacheItem.cpp (307): Image loading succeeded. support\ForkedCalls.cpp (507): ForkedCallQueue: I'm going to sleep
MWE-PDF preview.23.lyx
Description: application/lyx
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel