首页 \ 问答 \ zend_pdf无法读取现有的pdf(zend_pdf can't read existing pdf)

zend_pdf无法读取现有的pdf(zend_pdf can't read existing pdf)

我正在使用Zend_Pdf生成基于现有PDF模板的PDF文件。 问题是,我无法阅读任何模板 - 我得到的是“文件不是PDF”。 错误,因为文件中的前4个字符是“%???” 而不是“%PDF”(我用“头”来检查这个)。

这是一个字符编码问题吗? 我相信模板是ISO-8859-1,我必须在Zend_Pdf_Parser中设置一些来处理这个吗?

谢谢


I'm using Zend_Pdf to generate PDF files, based on existing PDF templates. The problem is, I can't read any of the templates - I get a "File is not a PDF." error because the first 4 characters in the file are "%???" instead of "%PDF" (I used "head" to check this).

Is this a character encoding problem? I believe the templates are in ISO-8859-1, must I set something in Zend_Pdf_Parser to handle this?

Thanks


原文:https://stackoverflow.com/questions/1941557
更新时间:2023-12-01 16:12

最满意答案

不,你不能合并它们 - 使用2个触发器映射到相同的工作。

使用Cron表达式,您可以定义事件(在此上下文中的作业)之间的时间间隔

“在每一天/接下来的日子里每运行X 小时/分钟/秒

等等。

你周日的情况与你的周日时间表没有任何共同的标准。


No, you cannot combine them - use 2 triggers mapped to the same job for that.

Using Cron expression you define intervals between events (jobs in this context) like

"run every X hours/minutes/seconds etc on each day/the following days"

and so on.

And your Sunday's condition doesn't have any common criteria with you weekday schedule.

相关问答

更多
  • 在将来使用一个表达方式 使用org.quartz.CronExpression一些快速测试。 String exp = "0 0 0 1 1 ? 3000"; boolean valid = CronExpression.isValidExpression(exp); System.out.println(valid); if (valid) { CronExpression cronExpression = new CronExpression(exp); System.out.print ...
  • 根据Quartz CronTrigger源代码 ,触发器会保留下一次应该触发的日期。 我想如果你在6:15:00启动服务器,Quartz会保留7:00:00作为下一次开机时间。 将服务器时间更改为5:55:45不会更新下一次开火时间,并且7:00:00将保留为下一次开火时间。 因此,事件不会在6:00:00开始,而是在7:00:00开始。 所以,时间不是直接保留的,但是保持开机时间,并且如果您更改系统时钟,则看起来不会更新。 According to Quartz CronTrigger source co ...
  • 我发现这实际上是Quartz.NET 2.0.1中的一个错误,但它已经在2.1.0中得到修复。 请参阅此答案了解详情。 I figured out that this actually is a bug in Quartz.NET 2.0.1, but it has already been fixed in 2.1.0. See this answer for details.
  • 确保你的app.config没有quartz节点的配置.szite配置应该写入app.config或quartz.config文件,配置双方都不是permittd。 Make sure your app.config don't have quartz node config.The quartz config should write to app.config or quartz.config file,config both sides is not permittd.
  • 可以使用ICronTrigger.CronExpressionString CronScheduleBuilder csb = CronScheduleBuilder .WeeklyOnDayAndHourAndMinute(DayOfWeek.Monday, 12, 0); ICronTrigger trigger = (ICronTrigger)TriggerBuilder .Create() .WithSchedule(csb) .Build(); string c ...
  • @ user1301587,希望你已经找到了前进的方法,但我注意到你的问题仍然在Google上显示得很高,所以我会继续添加一些伪代码来说明我将如何做到这一点: 从您的数据源获取计划(在您的情况下看起来像RDBMS数据库表) 遍历计划列表并使用计划构建CronScheduleBuilder实例: string cronExpression = string.Format(“{0} {1} {2} {3} {4} {5}”,secondPart,minutePart,hourPart,dayOfMonthPar ...
  • 不,你不能合并它们 - 使用2个触发器映射到相同的工作。 使用Cron表达式,您可以定义事件(在此上下文中的作业)之间的时间间隔 “在每一天/接下来的日子里每运行X 小时/分钟/秒 ” 等等。 你周日的情况与你的周日时间表没有任何共同的标准。 No, you cannot combine them - use 2 triggers mapped to the same job for that. Using Cron expression you define intervals between event ...
  • UNIX Cron表达式和Quartz表达式是不同的。 只是, 在Unix中 (分钟,小时,日,月,日_周,年) 在石英 (秒,分钟,小时,日,月,日_周,年) 您可以使用它来了解Cron表达式是否正确。 编辑:看看CronExpression.ValidateExpression方法。 UNIX Cron expressions and Quartz ones are differents. Simply, In Unix (minute, hour, day, month, day_of_week, y ...
  • 怎么样 Trigger[] triggers = sched.GetTriggersOfJob(id, groupid); foreach (SimpleTrigger simpleTrigger in triggers.OfType()) { //extract simple trigger info } foreach (CronTrigger cronTrigger in triggers.OfType()) { //extract ...
  • 您可能会混淆使用本地和UTC时间。 特别是如果你有Convert.ToDateTime("5/31/2014 4:30:00 PM") , DateTimeOffset.Now或date.DateTime 。 Quartz的一般规则是 UTC时间进入,UTC时间出来 。 以下是使用预期输出运行您的案例的示例(为简洁起见,使用非构建器API): var firstTrigger = new CronTriggerImpl(); firstTrigger.CronExpressionString = "0 0 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)