overleaf 无法编译出PDF

使用overleaf编辑Latax论文,把插入的图像换为pdf格式后,无法编译出PDF,使用png格式可以正常编译,主要两个问题:
1 使用pdflatax编译,无法编译出任何东西
2 使用Xelatax编译,只能编译出8页,总共12页

\begin{figure}[H]
\centering
\includegraphics[width=3.5in]{image/abf1.pdf}
\caption{Performance comparison of different numbers of connections per node.}%
\label{fig11}
\end{figure}

不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 这个问题的回答你可以参考下: https://ask.csdn.net/questions/739779
  • 我还给你找了一篇非常好的博客,你可以看看是否有帮助,链接:极速PDF编辑器提示缺少字体如何解决
  • 除此之外, 这篇博客: 如何跳过浏览器的PDF预览 直接打印中的 总结一下如何跳过浏览器的PDF预览 直接打印 部分也许能够解决你的问题, 你可以仔细阅读以下内容或者直接跳转源博客中阅读:

    首先

          需要准备一个应用 : WebApp Hardware Bridge ; 下载地址是:

    https://github.com/imTigger/webapp-hardware-bridge/releases 具体下载那一个呢 就看自己的需求了 我下载的是 whb-0.13.0.exe 版本, 下载好之后一波无脑安装就好.安装好之后,进入下一个环节.

    其次

          来到这个地址https://github.com/imTigger/webapp-hardware-bridge你可以通过git下载 也可以下载压缩包解压, 之后你会看到这样的目录

    在这里插入图片描述

    , 然后 点击 demo文件夹,选择websocket-pruinter.js文件,将这个文件放在你项目的js文件夹中,并在你需要跳过打印预览的页面引入这个js文件,然后使用你的编辑器打开printer-advanced.htm这个文件,你会在下面看到一系列的script就是这些:

    		<script>
        var printService = new WebSocketPrinter({
            onConnect: function () {
                $('#status').val('Connected');
            },
            onDisconnect: function () {
                $('#status').val('Disconnected');
            },
            onUpdate: function (message) {
                $('#status').val(message);
            },
        });
    
        function printPDF() {
            // console.log(111);
            printService.submit({
                'type': 'INVOICE',
                'url': $('#url').val()
            });
        }
    
        function printPDFWithId() {
            printService.submit({
                'type': 'INVOICE',
                'id': new Date().getTime(),
                'url': $('#url').val()
            });
        }
    
        function printPDFWithQty() {
            printService.submit({
                'type': 'INVOICE',
                'qty': $('#qty').val(),
                'url': $('#url').val()
            });
        }
    
    
        function printPDFWithFallback() {
            if (printService.isConnected()) {
                printPDF();
            } else {
                alert('WebApp Hardware Bridge not running');
                window.open($('#url').val());
            }
        }
    </script>
    

    我需要的只有var printService = new WebSocketPrinter()printPDF()以及printPDFWithFallback()为了方便 我直接 整合了后面的两个方法

    **关于具体的代码我是这样子写的**
    		//CONFIG_PRINTSERVICE_ADRESSE是当前打印机的地址 default = 127.0.0.1:12212
    		CONFIG_PRINTSERVICE_ADRESSE = <?php echo urldecode($_GET['configprintservice']);?>
    		printService = null;
    		if (typeof jQuery !== 'undefind'){
    			if (parseInt(str_replace('.','',jQuery.fn.jquery)) >= 331) {
    				printService = new WebStocketPrinter({
    					url = "ws://" + CONFIG_PRINTSERVICE_ADRESSE +"/printer",
    					onConnect: function () {
    					// 这里的信息 你可以根据自己或者客户的需要来打印自定义的消息
    						console.log('WebApp Hardware Birdge connected!!');
    					},
    					onDisconnect: function () {
    						// 这里的信息 你可以根据自己或者客户的需要来打印自定义的消息
    						console.log('WebApp Hardware Birdge disconnected! ')
    					},
    					onUpdate: funciton (message) {
    						console.log(message)
    					}
    				})
    			}
    		}
        function WebAppAutoPrint(url,redirsectto){
          if (printService && printService.isConnected()) {
            printService.submit({
            	// 这里的type内容需要和你下载的应用里的print type(文章末尾有图片) 相同就可以 注意:  区分大小写
              'type': 'INVOICE',
              'url': window.location.protocol+'//'+window.location.hostname+':'+window.location.port+WebAppRewriteUrl(url)
            });
            alert('print ok! ('+WebAppRewriteUrl(url).replace('/pdf/','')+')');
            if (redirsectto) {
    	        window.location.href=redirsectto;
            }
          } else {
            TINY86.box.show('<iframe src='+  url +'  width='+ CONFIG_TINY_WIDTH +' height='+ CONFIG_TINY_HEIGHT +' style=border:0></iframe>',0,0,0,1);
            if (redirsectto) {
            	if (document.getElementById('close_tinybox2')) document.getElementById('close_tinybox2').setAttribute('onclick',"window.location.href='"+redirsectto+"'")
            }
          }
        }
        
        funciton WebAppRewriteUrl(url){
        	var new_url = '';
              new_url = url.replace('/print/','/pdf/') ;
              new_url = new_url.replace('.php?','-');
              new_url = new_url.replace('id=(\d+)&qte=(\d+)','-$1-$2');
              new_url = new_url.replace('id=','');
              new_url = new_url.replace('&qte=','-');
              new_url += '.pdf';
    
              return new_url;
        }
    

    上面的JSRewriteUrl使我自己写的js重写url的方法,网上找了找看了看 , 借鉴了一下

    注意

    由于我的url是生成PDF的php文件所以 我需要在伪静态和js中重写 这个文件的路由

    然后

    你可以在你的电脑的工具栏找到下载的软件的图标 ,然后右键单击 ,选择configurator 会出来一个界面,你只需要在右下角的框中选中正确的打印机就好

    printapp

    其中的General如果你设置了类似于我的这个样子那就说明   :  是的,这意味着安装在 Web 服务器上的应用程序将监听来自本地网络的任何地址  


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^