TCPDF created Document: Warning: TT: nested FDEFs not allowed - pdf

When ill try to create a PDF with TCPDF, ill get the following error in Firebug:
PDF ca1e64da17eae2f8ea6f8d0c29bd5b30 [1.7 TCPDF 6.2.9 (http://www.tcpdf.org) / TCPDF] (PDF.js: 1.1.114)
Warning: TT: nested FDEFs not allowed
Warning: TT: nested FDEFs not allowed
Warning: TT: ENDF bad stack
Warning: TT: nested FDEFs not allowed
Warning: TT: ENDF bad stack
Ill dont find any useful information about this error. Can anyone help what is wrong here? The PDF ist about 12 Pages long, so its hard to find any error with this warning.
Ill found out that the problem only comes when ill use custom fonts - ill registered my fonts with:
tcpdf_addfont.php
in the console, and the font is showed correctly in the Browser PDF Plugin, and still when ill print the document.
Any ideas? Thanks for any help in advance!

Related

Problem with prestashop hook.php and tab.php files

We got an error at the top of some pages: Warning: Invalid argument supplied for foreach() in /public_html/classes/Hook.php on line 491.
I've read that it could be a problem with the foreach loop or arrays, but I don't know php and don't know how to fix it.
In line 491 I find: foreach ($results as $result) {
Another problem is that when I enter a category from the client side, I can't go to the 2nd/3rd/4th/5th page, only one page is displayed and the next ones don't want to load. The error Warning: Invalid argument supplied for foreach() in /public_html/classes/Hook.php on line 491 appears on pages that do not want to load.
I also get an error after enabling debug mode:
PrestaShopBundle\EntityTab.
The association PrestaShopBundle\EntityTab#tabLangs refers to the owning side field PrestaShopBundle\EntityTabLang#tab which does not exist.
I changed:
#ORM\OneToMany(targetEntity="PrestaShopBundle\Entity\TabLang", mappedBy="tab")
to
#ORM\OneToMany(targetEntity="PrestaShopBundle\Entity\TabLang", mappedBy="id")
insrc/PrestaShopBundle/Entity/Tab.php but it doesn't help.
PHP debug info debug info
I managed to solve the problem - I had to change active to m.active in the body of the sql query. Thank you

syncfusion.pdf.pdfException"Could Not Find valid signature (%pds-).'

string docuAddr = #"C:\Users\psimmon\source\repos\PDFTESTAPP\PDFTESTAPP\TempForms\forms-www.courts.state.co.us-Forms-PDF-JDF1117.pdf";
byte[] bytes = Encoding.Unicode.GetBytes(docuAddr);
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(bytes, true);---blows here
PdfLoadedForm myForm = loadedDocument.Form;
PdfLoadedFormFieldCollection fields = myForm.Fields;
not sure what I have done wrong here, but the PDF file is opening, either in a browser or a fileexployer window. so it has to be me, guessed at most of this, all you very smart folks, I could use your gray matter. forgive my stupidity.
The reported exception “could not find valid signature (%PDF-)” may occurs due to the file is not a PDF document. We suspect it seems the other format files are saved with the “.pdf” extension. We could not open and repair this type of document on our end, we have already added the details in our documentation,
Please find some of the following corrupted error messages that cannot be repaired:
UG: https://help.syncfusion.com/file-formats/pdf/open-and-save-pdf-file-in-c-sharp-vb-net#possible-error-messages-of-invalid-pdf-documents-while-loading
If you want to find this type of corrupted document, Syncfusion PDF Library provides support to check and report whether the existing PDF document is corrupted or not with corruption details and structure-level syntax errors.
UG: https://help.syncfusion.com/file-formats/pdf/working-with-document#find-corrupted-pdf-document
Blog: https://www.syncfusion.com/blogs/post/how-to-find-corrupted-pdf-files-in-c-sharp.aspx
KB: https://www.syncfusion.com/kb/9686/how-to-identify-the-corrupted-pdf-document-using-c-and-vb-net

Quarto book won't reder to pdf after adding image (html works): Error running filter /opt/quarto/share/filters/quarto-init/quarto-init.lua

I am using quarto book in Rstudio. Rendering to pdf used to work but now that I have added an image it stopped working with the following error (Rendering to html still works perfectly):
Error running filter /opt/quarto/share/filters/quarto-init/quarto-init.lua:
/opt/quarto/share/filters/quarto-init/quarto-init.lua:246: attempt to index a nil value (global 'text')
stack traceback:
/opt/quarto/share/filters/quarto-init/quarto-init.lua:16: in local 'fn'
/opt/quarto/share/filters/quarto-init/quarto-init.lua:554: in function </opt/quarto/share/filters/quarto-init/quarto-init.lua:548>
Has someone encountered this before and knows what to do?
I have updated to the latest quarto (1.0.38) and Rstudio but the error still persists.
Solved.
The image path had an extra \ eg. \images\img1.png.
Once changed to images\img1.png. it worked fine

Append database record in HTML5 builder fatal error

I have some code in my application:
$dmMain->tblOrgList->append();
This code written with auto-completion, so everything is correct.
But, when I trying to execute this code, I have error:
Fatal error: Call to a member function append() on a non-object in
C:\Users\ASAP\Documents\HTML5 Builder\Projects\VitoOrgList\index.php
on line 18
Can somebody advice, where I can find a trouble?
Thanks
I found the solution.
Really, I have no big PHP experience :-]
I just added before calling $dmMain methods in function body:
global $dmMain;

itext outofmemory error while attempting to count the number of pages in a pdf file

I'm trying to execute the following code:
PdfReader reader = new PdfReader("/path/to/file.pdf");
int pages = reader.getNumberOfPages();
It works on most files, but on one particular file, it crashes with error:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
at java.lang.StringBuffer.append(StringBuffer.java:320)
at com.itextpdf.text.pdf.PRTokeniser.readString(PRTokeniser.java:158)
at com.itextpdf.text.pdf.PRTokeniser.getStartxref(PRTokeniser.java:224)
at com.itextpdf.text.pdf.PRTokeniser.getStartxref(PRTokeniser.java:229)
...goes on for a while
at com.itextpdf.text.pdf.PRTokeniser.getStartxref(PRTokeniser.java:229)
I know that it's something wrong with the input file. I'm just wondering if there's a way of knowing before attempting to make the method call, that the file is going to cause a problem.
It turns out it was a bug with the version of itext I am using (5.0.1). I logged a query with the developers, and a fix was put in - that I tested - and which hopefully will find it's way into the next version (5.0.2)